Class: IletimerkeziSdk::Http::HttpClient

Inherits:
HttpClientInterface show all
Defined in:
lib/iletimerkezi_sdk/http/http_client.rb

Direct Known Subclasses

NetHttpClient

Constant Summary collapse

VERSION =
'1.0.0'.freeze
BASE_URL =
'https://api.iletimerkezi.com/v1'.freeze
USER_AGENT =
"iletimerkezi-ruby/#{VERSION}".freeze

Instance Method Summary collapse

Methods inherited from HttpClientInterface

#get, #post

Constructor Details

#initializeHttpClient

Returns a new instance of HttpClient.



8
9
10
11
12
# File 'lib/iletimerkezi_sdk/http/http_client.rb', line 8

def initialize
  @last_payload = nil
  @last_response_body = nil
  @last_status_code = nil
end

Instance Method Details

#get_bodyObject



18
19
20
# File 'lib/iletimerkezi_sdk/http/http_client.rb', line 18

def get_body
  @last_response_body
end

#get_payloadObject



14
15
16
# File 'lib/iletimerkezi_sdk/http/http_client.rb', line 14

def get_payload
  @last_payload
end

#get_status_codeObject



22
23
24
# File 'lib/iletimerkezi_sdk/http/http_client.rb', line 22

def get_status_code
  @last_status_code
end