Module: HalClient::EntryPointCovenienceMethods

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

Instance Method Summary collapse

Instance Method Details

#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`



70
71
72
# File 'lib/hal_client.rb', line 70

def get(url, options={})
  default_client.get(url, 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`



79
80
81
# File 'lib/hal_client.rb', line 79

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