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.
226 227 228 229 230 231 |
# File 'lib/soap/netHttpClient.rb', line 226 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.
224 225 226 |
# File 'lib/soap/netHttpClient.rb', line 224 def content @content end |
#contenttype ⇒ Object (readonly)
Returns the value of attribute contenttype.
223 224 225 |
# File 'lib/soap/netHttpClient.rb', line 223 def contenttype @contenttype end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
222 223 224 |
# File 'lib/soap/netHttpClient.rb', line 222 def reason @reason end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
221 222 223 |
# File 'lib/soap/netHttpClient.rb', line 221 def status @status end |
Class Method Details
.from_httpresponse(res) ⇒ Object
233 234 235 236 237 238 239 |
# File 'lib/soap/netHttpClient.rb', line 233 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 |