Class: Async::HTTP::Protocol::HTTP1::Request
- Inherits:
-
Request
- Object
- Protocol::HTTP::Request
- Request
- Async::HTTP::Protocol::HTTP1::Request
show all
- Defined in:
- lib/async/http/protocol/http1/request.rb
Constant Summary
collapse
- UPGRADE =
'upgrade'
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Request
#peer, #remote_address, #remote_address=
Constructor Details
#initialize(connection, authority, method, path, version, headers, body) ⇒ Request
Returns a new instance of Request.
38
39
40
41
42
43
44
45
|
# File 'lib/async/http/protocol/http1/request.rb', line 38
def initialize(connection, authority, method, path, version, , body)
@connection = connection
protocol = .delete('upgrade')
super(nil, authority, method, path, version, , body, protocol)
end
|
Class Method Details
.read(connection) ⇒ Object
30
31
32
33
34
|
# File 'lib/async/http/protocol/http1/request.rb', line 30
def self.read(connection)
if parts = connection.read_request
self.new(connection, *parts)
end
end
|
Instance Method Details
#connection ⇒ Object
47
48
49
|
# File 'lib/async/http/protocol/http1/request.rb', line 47
def connection
@connection
end
|
#hijack! ⇒ Object
55
56
57
|
# File 'lib/async/http/protocol/http1/request.rb', line 55
def hijack!
@connection.hijack!
end
|
#hijack? ⇒ Boolean
51
52
53
|
# File 'lib/async/http/protocol/http1/request.rb', line 51
def hijack?
true
end
|