httpx 0.5.1 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/httpx/connection/http2.rb +2 -18
- data/lib/httpx/plugins/h2c.rb +2 -2
- data/lib/httpx/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d617507c7290bb0ccfc2e20296841838cbbca56a07320598d8e33950d98c491
|
4
|
+
data.tar.gz: 396b9ec856b21eafeafd0fcb2ae62e720490f24c2f9306c061feb6ff33b2a080
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec899a23cf39d5ac0301e234314f35befb5f7fb0ce779b6087dc3845213e0daf5abb89d9a5536d6ad7924e6b7277a29d4526f50f0edf63f2260b7bc25788cb70
|
7
|
+
data.tar.gz: 4ede9787c37d0e8327e12f2e8cd08fd8542b8e714d09f3405e18ca1b965839471f2b582a5bb9b80c9bb9cbb922e249946f0522fcfe0bb8d7c87b8e0f406c995b
|
data/README.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# HTTPX: A Ruby HTTP library for tomorrow... and beyond!
|
2
2
|
|
3
|
+
[](http://rubygems.org/gems/httpx)
|
3
4
|
[](https://gitlab.com/honeyryderchuck/httpx/commits/master)
|
4
5
|
[](https://honeyryderchuck.gitlab.io/httpx/coverage/#_AllFiles)
|
5
6
|
|
@@ -1,29 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "io/wait"
|
4
|
-
require "http/2"
|
4
|
+
require "http/2/next"
|
5
5
|
|
6
6
|
module HTTPX
|
7
7
|
class Connection::HTTP2
|
8
8
|
include Callbacks
|
9
9
|
include Loggable
|
10
10
|
|
11
|
-
if HTTP2::VERSION < "0.10.1"
|
12
|
-
module HTTP2Extensions
|
13
|
-
refine ::HTTP2::Client do
|
14
|
-
def receive(*)
|
15
|
-
send_connection_preface
|
16
|
-
super
|
17
|
-
end
|
18
|
-
|
19
|
-
def <<(*args)
|
20
|
-
receive(*args)
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
using HTTP2Extensions
|
25
|
-
end
|
26
|
-
|
27
11
|
Error = Class.new(Error) do
|
28
12
|
def initialize(id, code)
|
29
13
|
super("stream #{id} closed with error: #{code}")
|
@@ -116,7 +100,7 @@ module HTTPX
|
|
116
100
|
end
|
117
101
|
|
118
102
|
def init_connection
|
119
|
-
@connection =
|
103
|
+
@connection = HTTP2Next::Client.new(@options.http2_settings)
|
120
104
|
@connection.on(:frame, &method(:on_frame))
|
121
105
|
@connection.on(:frame_sent, &method(:on_frame_sent))
|
122
106
|
@connection.on(:frame_received, &method(:on_frame_received))
|
data/lib/httpx/plugins/h2c.rb
CHANGED
@@ -25,7 +25,7 @@ module HTTPX
|
|
25
25
|
upgrade_request.headers.add("connection", "upgrade")
|
26
26
|
upgrade_request.headers.add("connection", "http2-settings")
|
27
27
|
upgrade_request.headers["upgrade"] = "h2c"
|
28
|
-
upgrade_request.headers["http2-settings"] =
|
28
|
+
upgrade_request.headers["http2-settings"] = HTTP2Next::Client.settings_header(upgrade_request.options.http2_settings)
|
29
29
|
wrap { send_requests(*upgrade_request, h2c_options).first }
|
30
30
|
|
31
31
|
responses = send_requests(*requests, h2c_options)
|
@@ -111,7 +111,7 @@ module HTTPX
|
|
111
111
|
end
|
112
112
|
|
113
113
|
module FrameBuilder
|
114
|
-
include
|
114
|
+
include HTTP2Next
|
115
115
|
|
116
116
|
module_function
|
117
117
|
|
data/lib/httpx/version.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: httpx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tiago Cardoso
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: http-2
|
14
|
+
name: http-2-next
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.1.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.1.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: timers
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -159,7 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
159
159
|
- !ruby/object:Gem::Version
|
160
160
|
version: '0'
|
161
161
|
requirements: []
|
162
|
-
rubygems_version: 3.0.
|
162
|
+
rubygems_version: 3.0.6
|
163
163
|
signing_key:
|
164
164
|
specification_version: 4
|
165
165
|
summary: HTTPX, to the future, and beyond
|