Exception: Grifter::RequestException
- Defined in:
- lib/grifter/http_service.rb
Instance Method Summary collapse
- #body ⇒ Object
-
#code ⇒ Object
shortcut methods.
-
#initialize(request, response) ⇒ RequestException
constructor
A new instance of RequestException.
-
#to_s ⇒ Object
this makes good info show up in rspec reports.
Constructor Details
#initialize(request, response) ⇒ RequestException
Returns a new instance of RequestException.
134 135 136 |
# File 'lib/grifter/http_service.rb', line 134 def initialize(request, response) @request, @response = request, response end |
Instance Method Details
#body ⇒ Object
148 149 150 |
# File 'lib/grifter/http_service.rb', line 148 def body @response.body end |
#code ⇒ Object
shortcut methods
144 145 146 |
# File 'lib/grifter/http_service.rb', line 144 def code @response.code end |
#to_s ⇒ Object
this makes good info show up in rspec reports
139 140 141 |
# File 'lib/grifter/http_service.rb', line 139 def to_s "#{self.class}\nResponseCode: #{@response.code}\nResponseBody:\n#{@response.body}" end |