Class: SOAP::NetHttpClient::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/soap/netHttpClient.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status, reason, contenttype, content) ⇒ Response

Returns a new instance of Response.



224
225
226
227
228
229
# File 'lib/soap/netHttpClient.rb', line 224

def initialize(status, reason, contenttype, content)
  @status = status
  @reason = reason
  @contenttype = contenttype
  @content = content
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



222
223
224
# File 'lib/soap/netHttpClient.rb', line 222

def content
  @content
end

#contenttypeObject (readonly)

Returns the value of attribute contenttype.



221
222
223
# File 'lib/soap/netHttpClient.rb', line 221

def contenttype
  @contenttype
end

#reasonObject (readonly)

Returns the value of attribute reason.



220
221
222
# File 'lib/soap/netHttpClient.rb', line 220

def reason
  @reason
end

#statusObject (readonly)

Returns the value of attribute status.



219
220
221
# File 'lib/soap/netHttpClient.rb', line 219

def status
  @status
end

Class Method Details

.from_httpresponse(res) ⇒ Object



231
232
233
234
235
236
237
# File 'lib/soap/netHttpClient.rb', line 231

def self.from_httpresponse(res)
  status = res.code.to_i
  reason = res.message
  contenttype = res['content-type']
  content = res.body
  new(status, reason, contenttype, content)
end