mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-04 00:00:37 -04:00
http2: added http2_settings as configurable options
This commit is contained in:
parent
491bf11e2e
commit
30fcdfeb2c
@ -109,7 +109,7 @@ module HTTPX
|
||||
end
|
||||
|
||||
def init_connection
|
||||
@connection = HTTP2::Client.new(settings_enable_push: 0)
|
||||
@connection = HTTP2::Client.new(@options.http2_settings)
|
||||
@connection.on(:frame, &method(:on_frame))
|
||||
@connection.on(:frame_sent, &method(:on_frame_sent))
|
||||
@connection.on(:frame_received, &method(:on_frame_received))
|
||||
|
@ -67,6 +67,7 @@ class OptionsSpec < Minitest::Test
|
||||
:form => {:bar => "bar"},
|
||||
:timeout => Timeout::PerOperation.new,
|
||||
:ssl => {:foo => "bar", :alpn_protocols => %w[h2 http/1.1] },
|
||||
:http2_settings => { :settings_enable_push => 0 },
|
||||
:fallback_protocol => "http/1.1",
|
||||
:headers => {"Foo" => "foo", "Accept" => "xml", "Bar" => "bar"},
|
||||
:max_concurrent_requests => 100,
|
||||
|
Loading…
x
Reference in New Issue
Block a user