class Async::HTTP::Protocol::HTTP1::Response

Public Class Methods

new(connection, version, status, reason, headers, body) click to toggle source

@param reason [String] HTTP response line reason, ignored.

Calls superclass method
# File lib/async/http/protocol/http1/response.rb, line 37
def initialize(connection, version, status, reason, headers, body)
        @connection = connection
        
        protocol = connection.upgrade?(headers)
        
        super(version, status, headers, body, protocol)
end
read(connection, request) click to toggle source
# File lib/async/http/protocol/http1/response.rb, line 30
def self.read(connection, request)
        if parts = connection.read_response(request.method)
                self.new(connection, *parts)
        end
end

Public Instance Methods

connection() click to toggle source
# File lib/async/http/protocol/http1/response.rb, line 45
def connection
        @connection
end
hijack!() click to toggle source
# File lib/async/http/protocol/http1/response.rb, line 53
def hijack!
        @connection.hijack!
end
hijack?() click to toggle source
# File lib/async/http/protocol/http1/response.rb, line 49
def hijack?
        @body.nil?
end