Method: FileboundClient::Client#put

Defined in:
lib/filebound_client.rb

#put(url, query_params = nil, body = nil) ⇒ Hash

Executes a PUT request on the current Filebound client session expecting JSON in the body of the request/response

Parameters:

  • url (String)

    the resource url to request

  • query_params (Hash) (defaults to: nil)

    the optional query parameters to pass to the PUT request

  • body (Hash) (defaults to: nil)

    the hash that will be converted to JSON when inserted in the body of the request

Returns:

  • (Hash)

    the JSON parsed hash of the response body



61
62
63
64
# File 'lib/filebound_client.rb', line 61

def put(url, query_params = nil, body = nil)
  params = { headers: { 'Content-Type' => 'application/json' }, query: query_params, body: body }
  JSON.parse(perform('put', url, params), symbolize_names: true, quirks_mode: true)
end