Class: Frenet::Request
- Inherits:
-
Object
- Object
- Frenet::Request
- Defined in:
- app/services/frenet/request.rb
Instance Method Summary collapse
- #get(path, body = {}) ⇒ Object
-
#initialize ⇒ Request
constructor
A new instance of Request.
- #post(path, body = {}) ⇒ Object
Constructor Details
#initialize ⇒ Request
Returns a new instance of Request.
2 |
# File 'app/services/frenet/request.rb', line 2 def initialize; end |
Instance Method Details
#get(path, body = {}) ⇒ Object
4 5 6 7 8 |
# File 'app/services/frenet/request.rb', line 4 def get(path, body={}) response = request.get(path, body) raise_error(response) unless response.success? response.body end |
#post(path, body = {}) ⇒ Object
10 11 12 13 14 |
# File 'app/services/frenet/request.rb', line 10 def post(path, body={}) response = request.post(path, body) raise_error(response) unless response.success? response.body end |