class Response
Definitions
attr :reason
Signature
-
attribute
String
The HTTP response line reason.
def initialize(connection, version, status, reason, headers, body)
Signature
-
parameter
reason
String
HTTP response line reason phrase.
Implementation
def initialize(connection, version, status, reason, headers, body)
@connection = connection
@reason = reason
# Technically, there should never be more than one value for the upgrade header, but we'll just take the first one to avoid complexity.
protocol = headers.delete(UPGRADE)&.first
super(version, status, headers, body, protocol)
end