Class: Rufus::Jig::HttpResponse
- Inherits:
-
Object
- Object
- Rufus::Jig::HttpResponse
- Defined in:
- lib/rufus/jig/http.rb,
lib/rufus/jig/adapters/em.rb,
lib/rufus/jig/adapters/patron.rb
Overview
Re-opening to adapt to Patron
Constant Summary collapse
- NHR =
/^Net::HTTP/
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#original ⇒ Object
readonly
Returns the value of attribute original.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
- #etag ⇒ Object
-
#initialize(res) ⇒ HttpResponse
constructor
A new instance of HttpResponse.
Constructor Details
#initialize(res) ⇒ HttpResponse
Returns a new instance of HttpResponse.
72 73 74 75 |
# File 'lib/rufus/jig/http.rb', line 72 def initialize(res) net_http_init(res) end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
69 70 71 |
# File 'lib/rufus/jig/http.rb', line 69 def body @body end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
69 70 71 |
# File 'lib/rufus/jig/http.rb', line 69 def headers @headers end |
#original ⇒ Object (readonly)
Returns the value of attribute original.
70 71 72 |
# File 'lib/rufus/jig/http.rb', line 70 def original @original end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
69 70 71 |
# File 'lib/rufus/jig/http.rb', line 69 def status @status end |
Instance Method Details
#etag ⇒ Object
77 78 79 80 |
# File 'lib/rufus/jig/http.rb', line 77 def etag headers['ETag'] || headers['Etag'] || headers['etag'] end |