This plugin adds support for upgrading a plaintext HTTP/1.1 connection to HTTP/2 (datatracker.ietf.org/doc/html/rfc7540#section-3.2)
Classes and Modules
Constants
VALID_H2C_VERBS | = | %w[GET OPTIONS HEAD].freeze |
Public Class methods
call(connection, request, response)
[show source]
# File lib/httpx/plugins/h2c.rb 19 def call(connection, request, response) 20 connection.upgrade_to_h2c(request, response) 21 end
extra_options(options)
[show source]
# File lib/httpx/plugins/h2c.rb 23 def extra_options(options) 24 options.merge(max_concurrent_requests: 1, upgrade_handlers: options.upgrade_handlers.merge("h2c" => self)) 25 end
load_dependencies(klass)
[show source]
# File lib/httpx/plugins/h2c.rb 15 def load_dependencies(klass) 16 klass.plugin(:upgrade) 17 end