class EZAPIClient::BaseRequest
Public Instance Methods
call()
click to toggle source
# File lib/ezapi_client/requests/base_request.rb, line 15 def call HTTParty.post(endpoint, { headers: { 'Content-Type' => "application/json" }, body: body.to_json, }) end
Private Instance Methods
default_endpoint()
click to toggle source
# File lib/ezapi_client/requests/base_request.rb, line 24 def default_endpoint full_path = if path.nil? nil elsif path[0].eql?("/") path else "/#{path}" end uri = URI.parse(host) uri.path = full_path uri.to_s end
default_path()
click to toggle source
# File lib/ezapi_client/requests/base_request.rb, line 38 def default_path fail "Override me" end