async-http 0.67.1 → 0.68.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/async/http/endpoint.rb +11 -0
- data/lib/async/http/internet.rb +2 -2
- data/lib/async/http/protocol/http.rb +1 -1
- data/lib/async/http/protocol/http1.rb +1 -1
- data/lib/async/http/protocol/http10.rb +1 -1
- data/lib/async/http/protocol/http11.rb +1 -1
- data/lib/async/http/protocol/http2.rb +1 -1
- data/lib/async/http/version.rb +1 -1
- data/license.md +1 -1
- data.tar.gz.sig +0 -0
- metadata +17 -23
- metadata.gz.sig +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 232e7394f119e448ebf2e16f2064d660ba164c852a23dc6d15c7cd7d3984d4de
|
4
|
+
data.tar.gz: 27bf2b400b9b4bab65cb2fee22ec75ed0ff74210fb61d53a1932ab3d8c6e9615
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab4cf960886ec3f8efdd0587fef2214213d09aabd8501d8c2fb212da706c78c2df73fe9dff7ce0d882945727fd7dc6635650658a5b84421b07257d94c5a2d435
|
7
|
+
data.tar.gz: 70aea8682c576a672afc7b0f009f03a2ed8fadfe33c5e39e668754d9c6dd3d0e875d40734447d3983d8b11f0b5e92ce275d282766844e2552431476a74837b0f
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/async/http/endpoint.rb
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
# Released under the MIT License.
|
4
4
|
# Copyright, 2019-2024, by Samuel Williams.
|
5
5
|
# Copyright, 2021-2022, by Adam Daniels.
|
6
|
+
# Copyright, 2024, by Thomas Morgan.
|
6
7
|
|
7
8
|
require 'io/endpoint'
|
8
9
|
require 'io/endpoint/host_endpoint'
|
@@ -32,6 +33,16 @@ module Async
|
|
32
33
|
)
|
33
34
|
end
|
34
35
|
|
36
|
+
# Coerce the given object into an endpoint.
|
37
|
+
# @parameter url [String | Endpoint] The URL or endpoint to convert.
|
38
|
+
def self.[](url)
|
39
|
+
if url.is_a?(Endpoint)
|
40
|
+
return url
|
41
|
+
else
|
42
|
+
Endpoint.parse(url.to_str)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
35
46
|
# @option scheme [String] the scheme to use, overrides the URL scheme.
|
36
47
|
# @option hostname [String] the hostname to connect to (or bind to), overrides the URL hostname (used for SNI).
|
37
48
|
# @option port [Integer] the port to bind to, overrides the URL port.
|
data/lib/async/http/internet.rb
CHANGED
@@ -39,7 +39,7 @@ module Async
|
|
39
39
|
# @parameter headers [Hash | Protocol::HTTP::Headers] The headers to send with the request.
|
40
40
|
# @parameter body [String | Protocol::HTTP::Body] The body to send with the request.
|
41
41
|
def call(method, url, headers = nil, body = nil)
|
42
|
-
endpoint = Endpoint
|
42
|
+
endpoint = Endpoint[url]
|
43
43
|
client = self.client_for(endpoint)
|
44
44
|
|
45
45
|
body = Body::Buffered.wrap(body)
|
@@ -60,7 +60,7 @@ module Async
|
|
60
60
|
|
61
61
|
::Protocol::HTTP::Methods.each do |name, verb|
|
62
62
|
define_method(verb.downcase) do |url, headers = nil, body = nil|
|
63
|
-
self.call(verb, url
|
63
|
+
self.call(verb, url, headers, body)
|
64
64
|
end
|
65
65
|
end
|
66
66
|
|
data/lib/async/http/version.rb
CHANGED
data/license.md
CHANGED
@@ -17,7 +17,7 @@ Copyright, 2021-2022, by Adam Daniels.
|
|
17
17
|
Copyright, 2022, by Ian Ker-Seymer.
|
18
18
|
Copyright, 2022, by Marco Concetto Rudilosso.
|
19
19
|
Copyright, 2022, by Tim Meusel.
|
20
|
-
Copyright, 2023, by Thomas Morgan.
|
20
|
+
Copyright, 2023-2024, by Thomas Morgan.
|
21
21
|
Copyright, 2023, by dependabot[bot].
|
22
22
|
Copyright, 2023, by Josh Huber.
|
23
23
|
Copyright, 2024, by Anton Zhuravsky.
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: async-http
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.68.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -57,7 +57,7 @@ cert_chain:
|
|
57
57
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
58
58
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
59
59
|
-----END CERTIFICATE-----
|
60
|
-
date: 2024-06-
|
60
|
+
date: 2024-06-23 00:00:00.000000000 Z
|
61
61
|
dependencies:
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
63
|
name: async
|
@@ -77,36 +77,30 @@ dependencies:
|
|
77
77
|
name: async-pool
|
78
78
|
requirement: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.
|
82
|
+
version: '0.7'
|
83
83
|
type: :runtime
|
84
84
|
prerelease: false
|
85
85
|
version_requirements: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0.
|
89
|
+
version: '0.7'
|
90
90
|
- !ruby/object:Gem::Dependency
|
91
91
|
name: io-endpoint
|
92
92
|
requirement: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '0.
|
97
|
-
- - ">="
|
98
|
-
- !ruby/object:Gem::Version
|
99
|
-
version: 0.10.3
|
96
|
+
version: '0.11'
|
100
97
|
type: :runtime
|
101
98
|
prerelease: false
|
102
99
|
version_requirements: !ruby/object:Gem::Requirement
|
103
100
|
requirements:
|
104
101
|
- - "~>"
|
105
102
|
- !ruby/object:Gem::Version
|
106
|
-
version: '0.
|
107
|
-
- - ">="
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: 0.10.3
|
103
|
+
version: '0.11'
|
110
104
|
- !ruby/object:Gem::Dependency
|
111
105
|
name: io-stream
|
112
106
|
requirement: !ruby/object:Gem::Requirement
|
@@ -127,56 +121,56 @@ dependencies:
|
|
127
121
|
requirements:
|
128
122
|
- - "~>"
|
129
123
|
- !ruby/object:Gem::Version
|
130
|
-
version: 0.26
|
124
|
+
version: '0.26'
|
131
125
|
type: :runtime
|
132
126
|
prerelease: false
|
133
127
|
version_requirements: !ruby/object:Gem::Requirement
|
134
128
|
requirements:
|
135
129
|
- - "~>"
|
136
130
|
- !ruby/object:Gem::Version
|
137
|
-
version: 0.26
|
131
|
+
version: '0.26'
|
138
132
|
- !ruby/object:Gem::Dependency
|
139
133
|
name: protocol-http1
|
140
134
|
requirement: !ruby/object:Gem::Requirement
|
141
135
|
requirements:
|
142
136
|
- - "~>"
|
143
137
|
- !ruby/object:Gem::Version
|
144
|
-
version: 0.19
|
138
|
+
version: '0.19'
|
145
139
|
type: :runtime
|
146
140
|
prerelease: false
|
147
141
|
version_requirements: !ruby/object:Gem::Requirement
|
148
142
|
requirements:
|
149
143
|
- - "~>"
|
150
144
|
- !ruby/object:Gem::Version
|
151
|
-
version: 0.19
|
145
|
+
version: '0.19'
|
152
146
|
- !ruby/object:Gem::Dependency
|
153
147
|
name: protocol-http2
|
154
148
|
requirement: !ruby/object:Gem::Requirement
|
155
149
|
requirements:
|
156
150
|
- - "~>"
|
157
151
|
- !ruby/object:Gem::Version
|
158
|
-
version: 0.18
|
152
|
+
version: '0.18'
|
159
153
|
type: :runtime
|
160
154
|
prerelease: false
|
161
155
|
version_requirements: !ruby/object:Gem::Requirement
|
162
156
|
requirements:
|
163
157
|
- - "~>"
|
164
158
|
- !ruby/object:Gem::Version
|
165
|
-
version: 0.18
|
159
|
+
version: '0.18'
|
166
160
|
- !ruby/object:Gem::Dependency
|
167
161
|
name: traces
|
168
162
|
requirement: !ruby/object:Gem::Requirement
|
169
163
|
requirements:
|
170
164
|
- - ">="
|
171
165
|
- !ruby/object:Gem::Version
|
172
|
-
version: 0.10
|
166
|
+
version: '0.10'
|
173
167
|
type: :runtime
|
174
168
|
prerelease: false
|
175
169
|
version_requirements: !ruby/object:Gem::Requirement
|
176
170
|
requirements:
|
177
171
|
- - ">="
|
178
172
|
- !ruby/object:Gem::Version
|
179
|
-
version: 0.10
|
173
|
+
version: '0.10'
|
180
174
|
description:
|
181
175
|
email:
|
182
176
|
executables: []
|
@@ -247,7 +241,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
247
241
|
- !ruby/object:Gem::Version
|
248
242
|
version: '0'
|
249
243
|
requirements: []
|
250
|
-
rubygems_version: 3.5.
|
244
|
+
rubygems_version: 3.5.11
|
251
245
|
signing_key:
|
252
246
|
specification_version: 4
|
253
247
|
summary: A HTTP client and server library.
|
metadata.gz.sig
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
|
2
|
-
���
|
3
|
-
|
1
|
+
17YT����*@�3}�-��Md�GZưm��CҁgE}��hj�S�;I���J��祓[L���:O��� m��f�2"2�8s��w��u8���7t
|
2
|
+
�p���נ�۶��$���AV�g���4@)
|
3
|
+
�8l��~4 �a�Q�0~��ޙ�}����wG��N�u�)�χDm�f���͛��W�M�4�
|