Module: Frontgo::Connection
- Included in:
- Client
- Defined in:
- lib/frontgo/connection.rb
Instance Method Summary collapse
- #delete(uri, headers: {}) ⇒ Object
- #get(uri, params = {}, headers: {}) ⇒ Object
- #post(uri, body, headers: {}) ⇒ Object
- #put(uri, body = {}, headers: {}) ⇒ Object
- #url_prefix ⇒ Object
Instance Method Details
#delete(uri, headers: {}) ⇒ Object
17 18 19 |
# File 'lib/frontgo/connection.rb', line 17 def delete(uri, headers: {}) request :delete, uri, nil, headers end |
#get(uri, params = {}, headers: {}) ⇒ Object
9 10 11 |
# File 'lib/frontgo/connection.rb', line 9 def get(uri, params = {}, headers: {}) @connection.get(uri, params, headers) end |
#post(uri, body, headers: {}) ⇒ Object
5 6 7 |
# File 'lib/frontgo/connection.rb', line 5 def post(uri, body, headers: {}) request :post, uri, body, headers end |
#put(uri, body = {}, headers: {}) ⇒ Object
13 14 15 |
# File 'lib/frontgo/connection.rb', line 13 def put(uri, body = {}, headers: {}) request :put, uri, body, headers end |
#url_prefix ⇒ Object
21 22 23 |
# File 'lib/frontgo/connection.rb', line 21 def url_prefix @connection.url_prefix end |