class Azure::Core::Http::HttpResponse::MockResponse
TODO: This needs to be deleted and HttpError needs to be refactored to not rely on HttpResponse
. The dependency on knowing the internal structure of HttpResponse
breaks good design principles. The only reason this class exists is because the HttpError parses the HttpResponse
to produce an error msg.
Attributes
body[RW]
headers[RW]
status[RW]
Public Class Methods
new(code, body, headers)
click to toggle source
# File lib/azure/core/http/http_response.rb, line 83 def initialize(code, body, headers) @status = code @body = body @headers = headers @headers.each { |k,v| @headers[k] = [v] unless v.respond_to? 'first' } end
Public Instance Methods
to_hash()
click to toggle source
# File lib/azure/core/http/http_response.rb, line 95 def to_hash @headers end