Class AWS::Http::Response
In: lib/aws/http/response.rb
Parent: Object

Represents the http response from a service request.

Responses have:

  • status (200, 404, 500, etc)
  • headers (hash of response headers)
  • body (the response body)

Methods

header   new  

External Aliases

timeout -> timeout?

Attributes

body  [RW]  @return [String] (’’) response http body
headers  [RW]  @return [Hash] ({}) response http headers
status  [RW]  @return [Integer] (200) response http status code
timeout  [RW]  @return [String] (false) set to true if the client gives up
  before getting a response from the service.

Public Class methods

@param [Hash] options @option options [Integer] :status (200) HTTP status code @option options [Hash] :headers ({}) HTTP response headers @option options [String] :body (’’) HTTP response body

Public Instance methods

Returns the header value with the given name.

The value is matched case-insensitively so if the headers hash contains a key like ‘Date’ and you request the value for ‘date’ the ‘Date’ value will be returned.

@param [String,Symbol] name The name of the header to fetch a value for. @return [String,nil] The value of the given header

[Validate]