Module: HalClient::EntryPointCovenienceMethods

Included in:
HalClient
Defined in:
lib/hal_client.rb

Instance Method Summary collapse

Instance Method Details

#delete(url, options = {}) ⇒ Object

Delete the resource identified at ‘url`.

url - The URL of the resource of interest. options - set of options to pass to ‘RestClient#get`



366
367
368
# File 'lib/hal_client.rb', line 366

def delete(url, options={})
  default_client.delete(url, options)
end

#get(url, options = {}) ⇒ Object

Returns a ‘Representation` of the resource identified by `url`.

url - The URL of the resource of interest. options - set of options to pass to ‘RestClient#get`



340
341
342
# File 'lib/hal_client.rb', line 340

def get(url, options={})
  default_client.get(url, options)
end

#patch(url, data, options = {}) ⇒ Object

Patch a ‘Representation` or `String` to the resource identified at `url`.

url - The URL of the resource of interest. data - a ‘String` or an object that responds to `#to_hal` options - set of options to pass to `RestClient#get`



358
359
360
# File 'lib/hal_client.rb', line 358

def patch(url, data, options={})
  default_client.patch(url, data, options)
end

#post(url, data, options = {}) ⇒ Object

Post a ‘Representation` or `String` to the resource identified at `url`.

url - The URL of the resource of interest. data - a ‘String` or an object that responds to `#to_hal` options - set of options to pass to `RestClient#get`



349
350
351
# File 'lib/hal_client.rb', line 349

def post(url, data, options={})
  default_client.post(url, data, options)
end