
httpx 1.1.0 has been released. ``` HTTPX.get("https://gitlab.com/honeyryderchuck/httpx <https://gitlab.com/honeyryderchuck/httpx>") ``` HTTPX is an HTTP client library for the Ruby programming language. Among its features, it supports: * HTTP/2 and HTTP/1.x protocol versions * Concurrent requests by default * Simple and chainable API * Proxy Support (HTTP(S), CONNECT tunnel, Socks4/4a/5) * Simple Timeout System * Lightweight by default (require what you need) And also: * Compression (gzip, deflate, brotli) * Streaming Requests * Authentication (Basic Auth, Digest Auth, AWS Sigv4) * Expect 100-continue * Multipart Requests * Cookies * HTTP/2 Server Push * H2C Upgrade * Automatic follow redirects * International Domain Names * GRPC * Circuit breaker * WebDAV * Datadog integration * Faraday integration * Webmock integration * Sentry integration Here are the updates since the last release: # 1.1.0 ## Features A function, `#peer_address`, was added to the response object, which returns the IP (either a string or an `IPAddr` object) from the socket used to get the response from. ```ruby response = HTTPX.get("https://example.com") response.peer_address #=> #<IPAddr: IPv4:93.184.216.34/255.255.255.255> ``` error responses will also expose an IP address via `#peer_address` as long a connection happened before the error. ## Improvements * A performance regression involving the new default timeouts has been fixed, which could cause significant overhead in "multiple requests in sequence" scenarios, and was clearly visible in benchmarks. * this regression will still be seen in jruby due to a bug, which fix will be released in jruby 9.4.5.0. * HTTP/1.1 connections are now set to handle as many requests as they can by default (instead of the past default of max 200, at which point they'd be recycled). * tolerate the inexistence of `openssl` in the installed ruby, like `net-http` does. * `on_connection_opened` and `on_connection_closed` will yield the `OpenSSL::SSL::SSLSocket` instance for `https` backed origins (instead of always the `Socket` instance). ## Bugfixes * when using the `:native` resolver (default option), a default of 1 for ndots is set, for systems which do not set one. * replaced usage of `Float::INFINITY` with `nil` for timeout defaults, as the former can't be used in IO wait functions. * `faraday` adapter timeout setup now maps to `:read_timeout` and `:write_timeout` options from `httpx`. * fixed HTTP/1.1 connection recycling on number of max requests exhausted. * `response.json` will now work when "content-type" header is set to "application/hal+json". ## Chore * when using the `:cookies` plugin, a warning message to install the idnx message will only be emitted if the cookie domain is an IDN (this message was being shown all the time since v1 release). # 1.0.2 ## bugfixes * bump `http-2-next` to 1.0.1, which fixes a bug where http/2 connection interprets MAX_CONCURRENT_STREAMS as request cap. * `grpc`: setup of rpc calls from camel-cased symbols has been fixed. As an improvement, the GRPC-enabled session will now support both snake-cased, as well as camel-cased calls. * `datadog` adapter has now been patched to support the most recent breaking changes of `ddtrace` configuration DSL (`env_to_bool` is no longer supported). # 1.0.1 ## Bugfixes * do not try to inflate empty chunks (it triggered an error during response decoding).