Skip to content

Add optional Req HTTPClient (and make it the default) - #175

Open
ryanwinchester wants to merge 5 commits into
lau:masterfrom
ryanwinchester-forks:feature/req-client
Open

Add optional Req HTTPClient (and make it the default)#175
ryanwinchester wants to merge 5 commits into
lau:masterfrom
ryanwinchester-forks:feature/req-client

Conversation

@ryanwinchester

@ryanwinchester ryanwinchester commented Jul 29, 2026

Copy link
Copy Markdown

Summary

  • Add a Req-based HTTP client
  • Make both Req and Hackney optional dependencies.
  • Automatically select an available HTTP client, preferring Req when both are installed.

Extras

  • CI and version updates
  • Fix a bad pattern-match

HTTP client selection

By default, Tzdata now selects its HTTP client in this order:

  1. Req
  2. Hackney
  3. An actionable runtime error if neither dependency is available

Users can still explicitly configure an adapter or provide a custom implementation of the Tzdata.HTTPClient behaviour:

config :tzdata, :http_client, Tzdata.HTTPClient.Hackney

No HTTP client dependency is required when automatic timezone data updates are disabled.

Closes #174
Closes #165
Closes #162

@noteven

noteven commented Aug 2, 2026

Copy link
Copy Markdown

Highly support this, tzdata is pushing an extremely out-of-date transitive dependency on hackney onto projects that leaves them open to CVEs of high severity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mark hackney optional

2 participants