Module: ZohoCrm::Fetch

Includes:
HTTParty
Defined in:
lib/zoho_crm/fetch.rb

Class Method Summary collapse

Class Method Details

.get(url, query) ⇒ Object



7
8
9
10
# File 'lib/zoho_crm/fetch.rb', line 7

def get(url, query)
  response = HTTParty.get(url, query: query, headers: {'Content-Type' => 'application/json'})
  ZohoCrm::ResponseObject.new(response)
end

.post(url, query) ⇒ Object



12
13
14
15
# File 'lib/zoho_crm/fetch.rb', line 12

def post(url, query)
  response = HTTParty.post(url, query: query, headers: {'Content-Type' => 'application/xml'})
  ZohoCrm::ResponseObject.new(response)
end