module HTTPX::Plugins::H2C

  1. lib/httpx/plugins/h2c.rb

This plugin adds support for upgrading a plaintext HTTP/1.1 connection to HTTP/2 (datatracker.ietf.org/doc/html/rfc7540#section-3.2)

gitlab.com/os85/httpx/wikis/Connection-Upgrade#h2c

Methods

Public Class

  1. call
  2. extra_options
  3. load_dependencies

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