class Response

The Response class is used to represent a set of HTTP response data. Populated instances of this class are serialized to JSON and passed to the GRIP proxy in the body. The GRIP proxy then parses the message and deserialized the JSON into an HTTP response that is passed back to the client.

Attributes

body[RW]
code[RW]
headers[RW]
reason[RW]

Public Class Methods

new(code=nil, reason=nil, headers=nil, body=nil) click to toggle source

Initialize with an HTTP response code, reason, headers, and body.

# File lib/response.rb, line 20
def initialize(code=nil, reason=nil, headers=nil, body=nil)
  @code = code
  @reason = reason
  @headers = headers
  @body = body
end