Class: OSA::HttpClient
- Inherits:
-
Object
- Object
- OSA::HttpClient
- Defined in:
- lib/osa/clients/http_client.rb
Direct Known Subclasses
Instance Method Summary collapse
- #delete(*args, **kwargs) ⇒ Object
- #get(*args, **kwargs) ⇒ Object
-
#initialize(connection) ⇒ HttpClient
constructor
A new instance of HttpClient.
- #patch(*args, **kwargs) ⇒ Object
- #post(*args, **kwargs) ⇒ Object
- #put(*args, **kwargs) ⇒ Object
Constructor Details
#initialize(connection) ⇒ HttpClient
Returns a new instance of HttpClient.
4 5 6 |
# File 'lib/osa/clients/http_client.rb', line 4 def initialize(connection) @connection = connection end |
Instance Method Details
#delete(*args, **kwargs) ⇒ Object
23 24 25 26 |
# File 'lib/osa/clients/http_client.rb', line 23 def delete(*args, **kwargs) response = @connection.delete(*args, **kwargs) handle_response(response) end |
#get(*args, **kwargs) ⇒ Object
8 9 10 11 |
# File 'lib/osa/clients/http_client.rb', line 8 def get(*args, **kwargs) response = @connection.get(*args, **kwargs) handle_response(response) end |
#patch(*args, **kwargs) ⇒ Object
28 29 30 31 |
# File 'lib/osa/clients/http_client.rb', line 28 def patch(*args, **kwargs) response = @connection.patch(*args, **kwargs) handle_response(response) end |
#post(*args, **kwargs) ⇒ Object
13 14 15 16 |
# File 'lib/osa/clients/http_client.rb', line 13 def post(*args, **kwargs) response = @connection.post(*args, **kwargs) handle_response(response) end |
#put(*args, **kwargs) ⇒ Object
18 19 20 21 |
# File 'lib/osa/clients/http_client.rb', line 18 def put(*args, **kwargs) response = @connection.put(*args, **kwargs) handle_response(response) end |