Class: SOAP::NetHttpClient::Response
- Defined in:
- lib/soap/netHttpClient.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#contenttype ⇒ Object
readonly
Returns the value of attribute contenttype.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(status, reason, contenttype, content) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(status, reason, contenttype, content) ⇒ Response
Returns a new instance of Response.
223 224 225 226 227 228 |
# File 'lib/soap/netHttpClient.rb', line 223 def initialize(status, reason, contenttype, content) @status = status @reason = reason @contenttype = contenttype @content = content end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
221 222 223 |
# File 'lib/soap/netHttpClient.rb', line 221 def content @content end |
#contenttype ⇒ Object (readonly)
Returns the value of attribute contenttype.
220 221 222 |
# File 'lib/soap/netHttpClient.rb', line 220 def contenttype @contenttype end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
219 220 221 |
# File 'lib/soap/netHttpClient.rb', line 219 def reason @reason end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
218 219 220 |
# File 'lib/soap/netHttpClient.rb', line 218 def status @status end |
Class Method Details
.from_httpresponse(res) ⇒ Object
230 231 232 233 234 235 236 |
# File 'lib/soap/netHttpClient.rb', line 230 def self.from_httpresponse(res) status = res.code.to_i reason = res. contenttype = res['content-type'] content = res.body new(status, reason, contenttype, content) end |