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.


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

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


214
215
216
# File 'lib/soap/netHttpClient.rb', line 214

def content
  @content
end

#contenttypeObject (readonly)

Returns the value of attribute contenttype


213
214
215
# File 'lib/soap/netHttpClient.rb', line 213

def contenttype
  @contenttype
end

#reasonObject (readonly)

Returns the value of attribute reason


212
213
214
# File 'lib/soap/netHttpClient.rb', line 212

def reason
  @reason
end

#statusObject (readonly)

Returns the value of attribute status


211
212
213
# File 'lib/soap/netHttpClient.rb', line 211

def status
  @status
end

Class Method Details

.from_httpresponse(res) ⇒ Object


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

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