Module: Kongkit::Client::Request
- Included in:
- Kongkit::Client
- Defined in:
- lib/kongkit/client/request.rb
Instance Method Summary collapse
-
#delete(path, options = {}) ⇒ Boolean
HTTP DELETE request.
-
#get(path, options = {}) ⇒ Kongkit::Client::Resource
HTTP GET request.
-
#patch(path, options = {}) ⇒ Kongkit::Client::Resource
HTTP PATCH request.
-
#post(path, options = {}) ⇒ Kongkit::Client::Resource
HTTP POST request.
Instance Method Details
#delete(path, options = {}) ⇒ Boolean
HTTP DELETE request
39 40 41 42 |
# File 'lib/kongkit/client/request.rb', line 39 def delete(path, = {}) response = self.class.delete(path, ) response.success? end |
#get(path, options = {}) ⇒ Kongkit::Client::Resource
HTTP GET request
9 10 11 12 |
# File 'lib/kongkit/client/request.rb', line 9 def get(path, = {}) response = self.class.get(path, ) parse(response) end |
#patch(path, options = {}) ⇒ Kongkit::Client::Resource
HTTP PATCH request
29 30 31 32 |
# File 'lib/kongkit/client/request.rb', line 29 def patch(path, = {}) response = self.class.patch(path, ) parse(response) end |
#post(path, options = {}) ⇒ Kongkit::Client::Resource
HTTP POST request
19 20 21 22 |
# File 'lib/kongkit/client/request.rb', line 19 def post(path, = {}) response = self.class.post(path, ) parse(response) end |