lib/unit-ruby/util/connection.rb
# Executes a PATCH request to the API
Executes a PATCH request to the API
Executes a PATCH request to the API
def patch(path, data = nil)
        response = connection.patch do |req|
          req.url path
          req.headers['Content-Type'] = 'application/vnd.api+json'
          req.body = data.deep_transform_keys! { |key| key.to_s.camelize(:lower) } if data
        end
        handle_errors(response)
        from_json_api(response.body)
      end
def patch ( path , data = nil ) response = connection . patch do | req | req . url path req . headers [ 'Content-Type' ] = 'application/vnd.api+json' req . body = data . deep_transform_keys! { | key | key . to_s . camelize ( :lower ) } if data end handle_errors ( response ) from_json_api ( response . body ) end
Executes a PATCH request to the API
Executes a PATCH request to the API
path
<not_specific>
data
<not_specific>