Method: Rest::Wrappers::InternalClientWrapper#patch

Defined in:
lib/rest/wrappers/internal_client_wrapper.rb

#patch(url, req_hash = {}) ⇒ Object



94
95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/rest/wrappers/internal_client_wrapper.rb', line 94

def patch(url, req_hash={})
  response = nil
  begin
    req_hash[:method] = :patch
    req_hash[:url] = url
    req_hash[:payload] = req_hash[:body] if req_hash[:body]
    r2 = Rest::InternalClient::Request.execute(req_hash)
    response = InternalClientResponseWrapper.new(r2)
  rescue Rest::InternalClient::Exception => ex
    raise InternalClientExceptionWrapper.new(ex)
  end
  response
end