Class: Async::HTTP::Protocol::HTTP2::Promise

Inherits:
Response show all
Defined in:
lib/async/http/protocol/http2/promise.rb

Instance Attribute Summary collapse

Attributes inherited from Response

#protocol

Attributes inherited from Response

#body, #headers, #reason, #status, #version

Instance Method Summary collapse

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

#requestObject (readonly)

Returns the value of attribute request.



35
36
37
# File 'lib/async/http/protocol/http2/promise.rb', line 35

def request
  @request
end

#streamObject (readonly)

Returns the value of attribute stream.



34
35
36
# File 'lib/async/http/protocol/http2/promise.rb', line 34

def stream
  @stream
end