class VLC360::Client
Attributes
locale[RW]
Public Instance Methods
request(url, body = {}, headers = {})
click to toggle source
# File lib/vlc360/client.rb, line 8 def request(url, body = {}, headers = {}) self.class.base_uri VLC360.base_uri self.class.post( url, body: body.to_json, headers: default_headers.merge(headers) ) end
Private Instance Methods
default_headers()
click to toggle source
# File lib/vlc360/client.rb, line 20 def default_headers { 'Content-Type' => 'application/json', 'Accept' => 'application/json', 'Accept-Charset' => 'UTF-8', 'CommpanyID' => VLC360.company_id.to_s, 'TokenSession' => VLC360.token_session.to_s, 'x-api-key' => VLC360.api_key.to_s } end