Module: HTTPX::Plugins::H2

Defined in:
lib/httpx/plugins/upgrade/h2.rb

Overview

This plugin adds support for upgrading an HTTP/1.1 connection to HTTP/2 via an Upgrade: h2 response declaration

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

Defined Under Namespace

Modules: ConnectionMethods

Class Method Summary collapse

Class Method Details

.call(connection, _request, _response) ⇒ Object



17
18
19
# File 'lib/httpx/plugins/upgrade/h2.rb', line 17

def call(connection, _request, _response)
  connection.upgrade_to_h2
end

.extra_options(options) ⇒ Object



13
14
15
# File 'lib/httpx/plugins/upgrade/h2.rb', line 13

def extra_options(options)
  options.merge(upgrade_handlers: options.upgrade_handlers.merge("h2" => self))
end