Class: MojFileUploaderApiClient::HttpClient
- Inherits:
-
Object
- Object
- MojFileUploaderApiClient::HttpClient
show all
- Defined in:
- lib/mojfile_uploader_api_client/http_client.rb
Constant Summary
collapse
- DEFAULT_OPTIONS =
{
headers: {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'x-amz-server-side-encryption' => 'AES256'
},
verify_ssl: false,
open_timeout: 5,
read_timeout: 15
}.freeze
Class Attribute Summary collapse
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Class Attribute Details
.base_url ⇒ Object
Returns the value of attribute base_url.
17
18
19
|
# File 'lib/mojfile_uploader_api_client/http_client.rb', line 17
def base_url
@base_url
end
|
.options ⇒ Object
Returns the value of attribute options.
17
18
19
|
# File 'lib/mojfile_uploader_api_client/http_client.rb', line 17
def options
@options
end
|
Instance Attribute Details
#response ⇒ Object
Returns the value of attribute response.
3
4
5
|
# File 'lib/mojfile_uploader_api_client/http_client.rb', line 3
def response
@response
end
|
Class Method Details
19
20
21
|
# File 'lib/mojfile_uploader_api_client/http_client.rb', line 19
def configure
yield(self)
end
|
Instance Method Details
#call ⇒ Object
24
25
26
27
|
# File 'lib/mojfile_uploader_api_client/http_client.rb', line 24
def call
execute_request
response
end
|
#endpoint ⇒ Object
29
30
31
|
# File 'lib/mojfile_uploader_api_client/http_client.rb', line 29
def endpoint
raise 'not implemented'
end
|
#options ⇒ Object
43
44
45
46
47
|
# File 'lib/mojfile_uploader_api_client/http_client.rb', line 43
def options
DEFAULT_OPTIONS.merge(self.class.options || {})
end
|
#payload ⇒ Object
37
|
# File 'lib/mojfile_uploader_api_client/http_client.rb', line 37
def payload; end
|
#payload? ⇒ Boolean
39
40
41
|
# File 'lib/mojfile_uploader_api_client/http_client.rb', line 39
def payload?
!payload.nil?
end
|
#verb ⇒ Object
33
34
35
|
# File 'lib/mojfile_uploader_api_client/http_client.rb', line 33
def verb
raise 'not implemented'
end
|