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.
21
22
23
24
25
26
27
28
|
# File 'lib/async/http/protocol/http1/request.rb', line 21
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
13
14
15
16
17
|
# File 'lib/async/http/protocol/http1/request.rb', line 13
def self.read(connection)
if parts = connection.read_request
self.new(connection, *parts)
end
end
|
Instance Method Details
#connection ⇒ Object
30
31
32
|
# File 'lib/async/http/protocol/http1/request.rb', line 30
def connection
@connection
end
|
#hijack! ⇒ Object
38
39
40
|
# File 'lib/async/http/protocol/http1/request.rb', line 38
def hijack!
@connection.hijack!
end
|
#hijack? ⇒ Boolean
34
35
36
|
# File 'lib/async/http/protocol/http1/request.rb', line 34
def hijack?
true
end
|
#write_interim_response(response) ⇒ Object
42
43
44
|
# File 'lib/async/http/protocol/http1/request.rb', line 42
def write_interim_response(response)
@connection.write_interim_response(response.version, response.status, response.)
end
|