Method: Databasedotcom::Client#http_patch
- Defined in:
- lib/databasedotcom/client.rb
#http_patch(path, data = nil, parameters = {}, headers = {}) ⇒ Object
Performs an HTTP PATCH request to the specified path (relative to self.instance_url). The body of the request is taken from data. Query parameters are included from parameters. The required Authorization
header is automatically included, as are any additional headers specified in headers. Returns the HTTPResult if it is of type HTTPSuccess- raises SalesForceError otherwise.
315 316 317 318 319 |
# File 'lib/databasedotcom/client.rb', line 315 def http_patch(path, data=nil, parameters={}, headers={}) with_encoded_path_and_checked_response(path, parameters, {:data => data}) do |encoded_path| https_request.send_request("PATCH", encoded_path, data, {"Content-Type" => data ? "application/json" : "text/plain", "Authorization" => "OAuth #{self.oauth_token}"}.merge(headers)) end end |