Module: FreshService::Connection
- Included in:
- Client
- Defined in:
- lib/fresh_service/connection.rb
Constant Summary collapse
- RETRY_HTTP_CODES =
408 -> Request Timeout 502 -> Bad Gateway 503 -> Service Unavailable 504 -> Gateway Timeout
[408, 502, 503, 504].freeze
Instance Method Summary collapse
-
#get(url, body = {}) ⇒ Object
Make a HTTP GET request.
-
#post(url, body = {}) ⇒ Object
Make a HTTP POST request.
-
#put(url, body = {}) ⇒ Object
Make a HTTP PUT request.
Instance Method Details
#get(url, body = {}) ⇒ Object
Make a HTTP GET request
21 22 23 |
# File 'lib/fresh_service/connection.rb', line 21 def get(url, body = {}) request :get, url, body end |
#post(url, body = {}) ⇒ Object
Make a HTTP POST request
30 31 32 |
# File 'lib/fresh_service/connection.rb', line 30 def post(url, body = {}) request :post, url, body end |
#put(url, body = {}) ⇒ Object
Make a HTTP PUT request
39 40 41 |
# File 'lib/fresh_service/connection.rb', line 39 def put(url, body = {}) request :put, url, body end |