HTTPX design goals are to be simple and intuitive to use, to not reinvent the wheel, and to be forwards-compatible with the protocols of tomorrow.
It was made in order to provide a ruby http test library that could support both HTTP/2 and HTTP/1 (and its unique features) using the same API. Beyond that, it tried to take the best features of existing ruby HTTP libraries, and avoiding its inconsistencies.
HTTPX ships with a plugin system "inherited" from sequel, roda or shrine. It allows for controlled extension of the core functionality, i.e. it can be plugged-in at the instance level.
require"httpx"# sends request with the "Authentication" headerauth_client=HTTPX.plugin(:authentication)auth_client.authentication("SECRET-TOKEN").get("http://example.com")#=> ...Authentication: "SECRET-TOKEN"\r\n...# does NOT send the "Authentication" headerHTTPX.get("http://example.come")
Proxy: learn how to send requests through HTTP, HTTPS, Socks4, Socks4a, Socks5 or SSH proxies.
Authentication: learn how to authenticate requests using HTTP Basic Auth or HTTP Digest Auth.
Follow Redirects: learn how to send requests which follow HTTP 3XX Redirect responses.
If you want to contribute, you have to focus on minimalism. If you look at the test suite, only one assertion method from minitest is mostly being used: assert. There will be exceptions, but you'll be asked to use assert whenever possible.
All HTTP features have an integration test using httpbin (with a few exceptions). If you want to add a missing HTTP feature, test it using an endpoint from httpbin which can validate your contribution.
You can also use the docker images to develop locally instead of relying fully on the remote endpoints. See how the automated test suite is build.