Class: Hoodoo::Client::Endpoint::HTTPBased::DescriptionOfResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/hoodoo/client/endpoint/endpoints/http_based.rb

Overview

Description of data describing an HTTP response. Used by #get_data_for_response to generate a response array or hash (see #response_class_for).

Instance Attribute Summary collapse

Instance Attribute Details

#actionObject

The action that was performed - a Symbol from Hoodoo::Services::Middleware::ALLOWED_ACTIONS.



159
160
161
# File 'lib/hoodoo/client/endpoint/endpoints/http_based.rb', line 159

def action
  @action
end

#http_headersObject

An object that will allow Hash-like lookup and iteration of key/value pairs via each. A raw Net::HTTPOK (sic.) instance from a successful response is an example of such an object.

May be unset (nil) or empty, especially for error cases.



175
176
177
# File 'lib/hoodoo/client/endpoint/endpoints/http_based.rb', line 175

def http_headers
  @http_headers
end

#http_status_codeObject

The HTTP status code _as an Integer_.



163
164
165
# File 'lib/hoodoo/client/endpoint/endpoints/http_based.rb', line 163

def http_status_code
  @http_status_code
end

#raw_body_dataObject

The raw (“unparsed”) returned body data as a String.



167
168
169
# File 'lib/hoodoo/client/endpoint/endpoints/http_based.rb', line 167

def raw_body_data
  @raw_body_data
end