Class: Async::HTTP::Protocol::HTTP2::Promise
- Defined in:
- lib/async/http/protocol/http2/promise.rb
Instance Attribute Summary collapse
-
#request ⇒ Object
readonly
Returns the value of attribute request.
-
#stream ⇒ Object
readonly
Returns the value of attribute stream.
Attributes inherited from Response
Attributes inherited from Response
#body, #headers, #reason, #status, #version
Instance Method Summary collapse
-
#initialize(protocol, headers, stream_id) ⇒ Promise
constructor
A new instance of Promise.
Methods inherited from Response
#hijack?, #peer, #remote_address, #remote_address=
Methods inherited from Response
[], #bad_request?, #continue?, #failure?, for_exception, #partial?, #preserve_method?, #redirection?, #server_failure?, #success?, #to_s
Methods included from Body::Reader
#body?, #close, #each, #finish, #read, #save
Constructor Details
#initialize(protocol, headers, stream_id) ⇒ Promise
Returns a new instance of Promise.
28 29 30 31 32 |
# File 'lib/async/http/protocol/http2/promise.rb', line 28 def initialize(protocol, headers, stream_id) super(protocol, stream_id) @request = build_request(headers) end |
Instance Attribute Details
#request ⇒ Object (readonly)
Returns the value of attribute request.
35 36 37 |
# File 'lib/async/http/protocol/http2/promise.rb', line 35 def request @request end |
#stream ⇒ Object (readonly)
Returns the value of attribute stream.
34 35 36 |
# File 'lib/async/http/protocol/http2/promise.rb', line 34 def stream @stream end |