class Async::HTTP::Protocol::HTTP2::Request
def push(path, headers = nil, scheme = @scheme, authority = @authority)
-
(Stream)
- the promised stream, on which to send data.
def push(path, headers = nil, scheme = @scheme, authority = @authority) raise ArgumentError, "Missing scheme!" unless scheme raise ArgumentError, "Missing authority!" unless authority push_headers = [ [SCHEME, scheme], [METHOD, ::Protocol::HTTP::Methods::GET], [PATH, path], [AUTHORITY, authority] ] if headers push_headers = Headers::Merged.new( push_headers, headers ) end @stream.send_push_promise(push_headers) end