Module: StartupStats::Requestable
- Included in:
- Countdb::Client, Formd::Client
- Defined in:
- lib/startupstats/requestable.rb
Overview
Defines HTTP request methods
Instance Method Summary collapse
-
#delete(path, params = {}) ⇒ Object
Perform an HTTP DELETE request.
-
#get(path, params = {}) ⇒ Object
Perform an HTTP GET request.
-
#post(path, params = {}) ⇒ Object
Perform an HTTP POST request.
-
#put(path, params = {}) ⇒ Object
Perform an HTTP PUT request.
Instance Method Details
#delete(path, params = {}) ⇒ Object
Perform an HTTP DELETE request
11 12 13 |
# File 'lib/startupstats/requestable.rb', line 11 def delete(path, params={}) request(:delete, path, params) end |
#get(path, params = {}) ⇒ Object
Perform an HTTP GET request
16 17 18 |
# File 'lib/startupstats/requestable.rb', line 16 def get(path, params={}) request(:get, path, params) end |
#post(path, params = {}) ⇒ Object
Perform an HTTP POST request
21 22 23 |
# File 'lib/startupstats/requestable.rb', line 21 def post(path, params={}) request(:post, path, params) end |
#put(path, params = {}) ⇒ Object
Perform an HTTP PUT request
26 27 28 |
# File 'lib/startupstats/requestable.rb', line 26 def put(path, params={}) request(:put, path, params) end |