class Protocol::HTTP2::Stream

def write_push_promise(stream_id, headers, flags = 0, **options)

The server generates the same set of headers as if the client was sending a request, and sends these to the client. The client can reject the request by resetting the (new) stream. Otherwise, the server will start sending a response as if the client had send the request.
A push promise is server request -> client -> server response -> client.
A normal request is client request -> server response -> client.
def write_push_promise(stream_id, headers, flags = 0, **options)
 PushPromiseFrame.new(@id, flags)
tion.write_frames do |framer|
 @connection.encode_headers(headers)
pack(stream_id, data, maximum_size: @connection.maximum_frame_size)
.write_frame(frame)
frame