class Protocol::HTTP::Response
def initialize(version = nil, status = 200, headers = Headers.new, body = nil, protocol = nil)
@parameter body [Body::Readable] The body, e.g. `"Hello, World!"`, etc.
@parameter headers [Hash] The headers, e.g. `{"content-type" => "text/html"}`, etc.
@parameter status [Integer] The HTTP status code, e.g. `200`, `404`, etc.
@parameter version [String | Nil] The HTTP version, e.g. `"HTTP/1.1"`. If `nil`, the version may be provided by the server sending the response.
Create a new response.
def initialize(version = nil, status = 200, headers = Headers.new, body = nil, protocol = nil) @version = version @status = status @headers = headers @body = body @protocol = protocol end