Method: Bandwidth::HttpResponse#initialize

Defined in:
lib/bandwidth/http/http_response.rb

#initialize(status_code, reason_phrase, headers, raw_body, request) ⇒ HttpResponse

The constructor

Parameters:

  • The (Integer)

    status code returned by the server.

  • The (String)

    reason phrase returned by the server.

  • The (Hash)

    headers sent by the server in the response.

  • The (String)

    raw body of the response.

  • The (HttpRequest)

    request that resulted in this response.



17
18
19
20
21
22
23
24
25
26
27
# File 'lib/bandwidth/http/http_response.rb', line 17

def initialize(status_code,
               reason_phrase,
               headers,
               raw_body,
               request)
  @status_code = status_code
  @reason_phrase = reason_phrase
  @headers = headers
  @raw_body = raw_body
  @request = request
end