class HTTPX::Plugins::H2C::H2CParser

  1. lib/httpx/plugins/h2c.rb
Superclass: HTTP2

Methods

Public Instance

  1. upgrade

Public Instance methods

upgrade (request, response)
[show source]
   # File lib/httpx/plugins/h2c.rb
69 def upgrade(request, response)
70   @connection.send_connection_preface
71   # skip checks, it is assumed that this is the first
72   # request in the connection
73   stream = @connection.upgrade
74   handle_stream(stream, request)
75   @streams[request] = stream
76 
77   # clean up data left behind in the buffer, if the server started
78   # sending frames
79   data = response.to_s
80   @connection << data
81 end