httpx 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -0
- data/lib/httpx/chainable.rb +1 -1
- data/lib/httpx/channel.rb +1 -1
- data/lib/httpx/client.rb +2 -2
- data/lib/httpx/plugins/basic_authentication.rb +1 -1
- data/lib/httpx/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c5b48a5d65398810ef73e2361ca65c113091b91f1dcb88cf7602da6c680e1b1
|
4
|
+
data.tar.gz: 9995ed5b22888e9e0a737be6c197d1d30f5b21d06a7b304242cd3c86efe2f386
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd3877426964516076b6516237169d06435ff9e39dc44ba977e993de3dfbdcbf90b5a7e486e5f76827f89032d0c9ac5e1d2bac144d025fbe888ff3e07384243d
|
7
|
+
data.tar.gz: 91fcd80f50d0ea4ca564291f4568e78a991b36e52eeb10033dd4e054ff27e7895961b2b69d6d1058eae1be646ee037707e8e9e056994305920cab5a6f3ed61a3
|
data/README.md
CHANGED
@@ -102,6 +102,8 @@ The test suite runs against [httpbin proxied over nghttp2](https://nghttp2.org/h
|
|
102
102
|
|
103
103
|
All Rubies greater or equal to 2.1, and always latest JRuby.
|
104
104
|
|
105
|
+
**Note**: This gem is tested against all latest patch versions, i.e. if you're using 2.2.0 and you experience some issue, please test it against 2.2.10 (latest patch version of 2.2) before creating an issue.
|
106
|
+
|
105
107
|
## Resources
|
106
108
|
| | |
|
107
109
|
| ------------- | --------------------------------------------------- |
|
@@ -112,12 +114,18 @@ All Rubies greater or equal to 2.1, and always latest JRuby.
|
|
112
114
|
|
113
115
|
## Caveats
|
114
116
|
|
117
|
+
### ALPN support
|
118
|
+
|
115
119
|
`HTTPS` TLS backend is ruby's own `openssl` gem.
|
116
120
|
|
117
121
|
If your requirement is to run requests over HTTP/2 and TLS, make sure you run a version of the gem which compiles OpenSSL 1.0.2 (Ruby 2.3 and higher are guaranteed to).
|
118
122
|
|
119
123
|
JRuby's `openssl` is based on Bouncy Castle, which is massively outdated and still doesn't implement ALPN. So HTTP/2 over TLS/ALPN negotiation is off until JRuby figures this out.
|
120
124
|
|
125
|
+
### Known bugs
|
126
|
+
|
127
|
+
Doesn't work with ruby 2.4.0 for Windows (see [#36](https://gitlab.com/honeyryderchuck/httpx/issues/36)).
|
128
|
+
|
121
129
|
## Contributing
|
122
130
|
|
123
131
|
* Discuss your contribution in an issue
|
data/lib/httpx/chainable.rb
CHANGED
data/lib/httpx/channel.rb
CHANGED
data/lib/httpx/client.rb
CHANGED
@@ -84,8 +84,8 @@ module HTTPX
|
|
84
84
|
when 2, 3
|
85
85
|
verb, uris = args
|
86
86
|
if uris.respond_to?(:each)
|
87
|
-
uris.map do |uri|
|
88
|
-
__build_req(verb, uri, options)
|
87
|
+
uris.map do |uri, **opts|
|
88
|
+
__build_req(verb, uri, options.merge(opts))
|
89
89
|
end
|
90
90
|
else
|
91
91
|
[__build_req(verb, uris, options)]
|
@@ -10,7 +10,7 @@ module HTTPX
|
|
10
10
|
|
11
11
|
module InstanceMethods
|
12
12
|
def basic_authentication(user, password)
|
13
|
-
authentication("Basic #{Base64.strict_encode64("#{user}:#{password}")}")
|
13
|
+
authentication("Basic #{Base64.strict_encode64("#{URI.escape(user)}:#{URI.escape(password)}")}")
|
14
14
|
end
|
15
15
|
alias_method :basic_auth, :basic_authentication
|
16
16
|
end
|
data/lib/httpx/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: httpx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tiago Cardoso
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http-2
|