Module: Lieu::Request
- Included in:
- Client
- Defined in:
- lib/lieu/request.rb
Overview
Methods for HTTP requests
Instance Method Summary collapse
-
#get(path, options = {}) ⇒ Hashie::Mash
Make a HTTP GET request.
-
#post(path, options = {}) ⇒ Hashie::Mash
Make a HTTP POST request.
Instance Method Details
#get(path, options = {}) ⇒ Hashie::Mash
Make a HTTP GET request.
9 10 11 |
# File 'lib/lieu/request.rb', line 9 def get(path, ={}) request(:get, path, ) end |
#post(path, options = {}) ⇒ Hashie::Mash
Make a HTTP POST request.
18 19 20 21 22 23 24 |
# File 'lib/lieu/request.rb', line 18 def post(path, ={}) response = request(:post, path, ) response.delete(:status) if response.respond_to?(:status) response end |