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/honeyryderchuck/httpx/wikis/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

.configure(klass) ⇒ Object



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

def configure(klass)
  klass.default_options.upgrade_handlers.register "h2", self
end