Class: ChimeraHttpClient::Connection
- Defined in:
- lib/chimera_http_client/connection.rb
Constant Summary
Constants inherited from Base
Instance Method Summary collapse
- #delete(endpoint, options = {}) ⇒ Object
- #get(endpoint, options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ Connection
constructor
A new instance of Connection.
- #patch(endpoint, options = {}) ⇒ Object
- #post(endpoint, options = {}) ⇒ Object
- #put(endpoint, options = {}) ⇒ Object
- #request ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Connection
Returns a new instance of Connection.
6 7 8 9 10 |
# File 'lib/chimera_http_client/connection.rb', line 6 def initialize( = {}) super() define_bang_methods end |
Instance Method Details
#delete(endpoint, options = {}) ⇒ Object
32 33 34 |
# File 'lib/chimera_http_client/connection.rb', line 32 def delete(endpoint, = {}) run(:delete, endpoint, .merge(body_optional: true)) end |
#get(endpoint, options = {}) ⇒ Object
16 17 18 |
# File 'lib/chimera_http_client/connection.rb', line 16 def get(endpoint, = {}) run(:get, endpoint, .merge(body_optional: true)) end |
#patch(endpoint, options = {}) ⇒ Object
28 29 30 |
# File 'lib/chimera_http_client/connection.rb', line 28 def patch(endpoint, = {}) run(:patch, endpoint, ) end |
#post(endpoint, options = {}) ⇒ Object
20 21 22 |
# File 'lib/chimera_http_client/connection.rb', line 20 def post(endpoint, = {}) run(:post, endpoint, ) end |
#put(endpoint, options = {}) ⇒ Object
24 25 26 |
# File 'lib/chimera_http_client/connection.rb', line 24 def put(endpoint, = {}) run(:put, endpoint, ) end |