[ANN] httpx 0.19.0 released

httpx 0.19.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), 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

# 0.19.0

https://honeyryderchuck.gitlab.io/httpx/2022/01/26/httpx-0-19-happy-eyeballs-curl-to-httpx.html

## Features

### Happy Eyeballs v2

When the system supports dual-stack networking, `httpx` implements the
Happy Eyeballs v2 algorithm (RFC 8305) to resolve hostnames to both IPv6
and IPv4 addresses while privileging IPv6 connectivity. This is implemented
by `httpx` both for the `:native` as well as the `:https` (DoH) resolver
(which do not perform address sorting, thereby being "DNS-based
load-balancing" friendly), and "outsourced" to `getaddrinfo` when using the
`:system` resolver.

IPv6 connectivity will also be privileged for `/etc/hosts` local DNS (i.e.
`localhost` connections will connec to `::1`).

A new option, `:ip_families`, will also be available (`[Socket::AF_INET6,
Socket::AF_INET]` in dual-stack systems). If you'd like to i.e. force IPv4
connectivity, you can do use it (`client = HTTPX.with(ip_families:
[Socket::AF_INET])`).

## Improvements

### DNS: :system resolver uses getaddrinfo (instead of the resolver lib)

The `:system` resolver switched to using the `getaddinfo` system function
to perform DNS requests. Not only is this call **not** blocking the session
event loop anymore (unlike pre-0.19.0 `:system` resolver), it adds a lot of
functionality that the stdlib `resolv` library just doesn't support at the
moment (such as SRV records).

### HTTP/2 proxy support

The `:proxy` plugin handles "prior-knowledge" HTTP/2 proxies.

HTTPX.plugin(:proxy, fallback_protocol: "h2").with_proxy(uri: "
http://http2-proxy:3128").get(...

Connection coalescing has also been enabled for proxied connections (also
`CONNECT`-tunneled connections).

### curl-to-httpx

widget in [project website](· HTTPX) to
turn curl commands into the equivalent `httpx` code.

## Bugfixes

* faraday adapter now supports passing session options.
* proxy: several fixes which enabled env-var (`HTTP(S)_PROXY`) defined
proxy support.
* proxy: fixed graceful recovery from proxy tcp connect errors.
* several fixes around CNAMEs timeouts with the native resolver.
* https resolver is now closed when wrapping session closes (it was left
open).

# 0.18.6

## Bugfixes

* multipart plugin: fixed `filemagic` integration by rewinding the file
after mime-type detection.

# 0.18.6

## Bugfixes

* multipart plugin: fixed missing constant in `filemagic` integration.

Does it support Webdav? Thanks

···

On Wed, Feb 2, 2022 at 9:15 PM Tiago Cardoso <honeyryderchuck@gmail.com> wrote:

httpx 0.19.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), 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

# 0.19.0

https://honeyryderchuck.gitlab.io/httpx/2022/01/26/httpx-0-19-happy-eyeballs-curl-to-httpx.html

## Features

### Happy Eyeballs v2

When the system supports dual-stack networking, `httpx` implements the
Happy Eyeballs v2 algorithm (RFC 8305) to resolve hostnames to both IPv6
and IPv4 addresses while privileging IPv6 connectivity. This is implemented
by `httpx` both for the `:native` as well as the `:https` (DoH) resolver
(which do not perform address sorting, thereby being "DNS-based
load-balancing" friendly), and "outsourced" to `getaddrinfo` when using the
`:system` resolver.

IPv6 connectivity will also be privileged for `/etc/hosts` local DNS (i.e.
`localhost` connections will connec to `::1`).

A new option, `:ip_families`, will also be available (`[Socket::AF_INET6,
Socket::AF_INET]` in dual-stack systems). If you'd like to i.e. force IPv4
connectivity, you can do use it (`client = HTTPX.with(ip_families:
[Socket::AF_INET])`).

## Improvements

### DNS: :system resolver uses getaddrinfo (instead of the resolver lib)

The `:system` resolver switched to using the `getaddinfo` system function
to perform DNS requests. Not only is this call **not** blocking the session
event loop anymore (unlike pre-0.19.0 `:system` resolver), it adds a lot of
functionality that the stdlib `resolv` library just doesn't support at the
moment (such as SRV records).

### HTTP/2 proxy support

The `:proxy` plugin handles "prior-knowledge" HTTP/2 proxies.

HTTPX.plugin(:proxy, fallback_protocol: "h2").with_proxy(uri: "
http://http2-proxy:3128").get(...

Connection coalescing has also been enabled for proxied connections (also
`CONNECT`-tunneled connections).

### curl-to-httpx

widget in [project website](HTTPX · honeyryder) to
turn curl commands into the equivalent `httpx` code.

## Bugfixes

* faraday adapter now supports passing session options.
* proxy: several fixes which enabled env-var (`HTTP(S)_PROXY`) defined
proxy support.
* proxy: fixed graceful recovery from proxy tcp connect errors.
* several fixes around CNAMEs timeouts with the native resolver.
* https resolver is now closed when wrapping session closes (it was left
open).

# 0.18.6

## Bugfixes

* multipart plugin: fixed `filemagic` integration by rewinding the file
after mime-type detection.

# 0.18.6

## Bugfixes

* multipart plugin: fixed missing constant in `filemagic` integration.

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

It does ship with helpers for webdav http methods.

A quarta, 2/02/2022, 23:58, Bitfox <bitfox@bitfox.top> escreveu:

···

Does it support Webdav? Thanks

On Wed, Feb 2, 2022 at 9:15 PM Tiago Cardoso <honeyryderchuck@gmail.com> > wrote:

httpx 0.19.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), 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

# 0.19.0

https://honeyryderchuck.gitlab.io/httpx/2022/01/26/httpx-0-19-happy-eyeballs-curl-to-httpx.html

## Features

### Happy Eyeballs v2

When the system supports dual-stack networking, `httpx` implements the
Happy Eyeballs v2 algorithm (RFC 8305) to resolve hostnames to both IPv6
and IPv4 addresses while privileging IPv6 connectivity. This is implemented
by `httpx` both for the `:native` as well as the `:https` (DoH) resolver
(which do not perform address sorting, thereby being "DNS-based
load-balancing" friendly), and "outsourced" to `getaddrinfo` when using the
`:system` resolver.

IPv6 connectivity will also be privileged for `/etc/hosts` local DNS
(i.e. `localhost` connections will connec to `::1`).

A new option, `:ip_families`, will also be available (`[Socket::AF_INET6,
Socket::AF_INET]` in dual-stack systems). If you'd like to i.e. force IPv4
connectivity, you can do use it (`client = HTTPX.with(ip_families:
[Socket::AF_INET])`).

## Improvements

### DNS: :system resolver uses getaddrinfo (instead of the resolver lib)

The `:system` resolver switched to using the `getaddinfo` system function
to perform DNS requests. Not only is this call **not** blocking the session
event loop anymore (unlike pre-0.19.0 `:system` resolver), it adds a lot of
functionality that the stdlib `resolv` library just doesn't support at the
moment (such as SRV records).

### HTTP/2 proxy support

The `:proxy` plugin handles "prior-knowledge" HTTP/2 proxies.

HTTPX.plugin(:proxy, fallback_protocol: "h2").with_proxy(uri: "
http://http2-proxy:3128").get(...

Connection coalescing has also been enabled for proxied connections (also
`CONNECT`-tunneled connections).

### curl-to-httpx

widget in [project website](HTTPX · honeyryder) to
turn curl commands into the equivalent `httpx` code.

## Bugfixes

* faraday adapter now supports passing session options.
* proxy: several fixes which enabled env-var (`HTTP(S)_PROXY`) defined
proxy support.
* proxy: fixed graceful recovery from proxy tcp connect errors.
* several fixes around CNAMEs timeouts with the native resolver.
* https resolver is now closed when wrapping session closes (it was left
open).

# 0.18.6

## Bugfixes

* multipart plugin: fixed `filemagic` integration by rewinding the file
after mime-type detection.

# 0.18.6

## Bugfixes

* multipart plugin: fixed missing constant in `filemagic` integration.

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;