Module: HTTPX::Plugins::H2C::ConnectionMethods
- Defined in:
- lib/httpx/plugins/h2c.rb
Instance Method Summary collapse
- #build_parser ⇒ Object
- #coalescable?(connection) ⇒ Boolean
- #match?(uri, options) ⇒ Boolean
- #upgrade(request, response) ⇒ Object
Instance Method Details
#build_parser ⇒ Object
106 107 108 109 110 |
# File 'lib/httpx/plugins/h2c.rb', line 106 def build_parser(*) return super unless @origin.scheme == "http" super("http/1.1") end |
#coalescable?(connection) ⇒ Boolean
93 94 95 96 97 |
# File 'lib/httpx/plugins/h2c.rb', line 93 def coalescable?(connection) return super unless @options.fallback_protocol == "h2c" && @origin.scheme == "http" @origin == connection.origin && connection..fallback_protocol == "h2c" end |
#match?(uri, options) ⇒ Boolean
87 88 89 90 91 |
# File 'lib/httpx/plugins/h2c.rb', line 87 def match?(uri, ) return super unless uri.scheme == "http" && @options.fallback_protocol == "h2c" super && .fallback_protocol == "h2c" end |