We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Async::HTTP::Internet
URI::HTTP
1 parent 2da8b15 commit 0f11811Copy full SHA for 0f11811
lib/async/http/endpoint.rb
@@ -39,7 +39,7 @@ def self.[](url)
39
if url.is_a?(Endpoint)
40
return url
41
else
42
- Endpoint.parse(url.to_str)
+ Endpoint.parse(url.to_s)
43
end
44
45
test/async/http/internet.rb
@@ -23,6 +23,15 @@
23
response.close
24
25
26
+ it "can accept URI::HTTP objects" do
27
+ uri = URI.parse("https://www.codeotaku.com/index")
28
+ response = internet.get(uri, headers)
29
+
30
+ expect(response).to be(:success?)
31
+ ensure
32
+ response&.close
33
+ end
34
35
let(:sample) {{"hello" => "world"}}
36
let(:body) {[JSON.dump(sample)]}
37
0 commit comments