Port configurable HTTP timeouts to develop (#184)#186
Open
gregwinn wants to merge 2 commits into
Open
Conversation
hackney's defaults (8s connect / 5s recv) are too aggressive for slower APIs —
valid-but-slow endpoints (foot-traffic / "live" APIs that compute on request)
time out. Each verb now takes an optional trailing Opts map:
HTTP.post(url, body, %{timeout: 30000})
supporting timeout/recv_timeout, connect_timeout, follow_redirect. Defaults are
connect 15s / recv 30s, all overridable per call. Existing 1-/2-arg calls are
unchanged (delegate with defaults). Verified: a 2s opt fails an 8s endpoint, the
default succeeds; the exports test still passes (old arities retained).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports the v0.9.4 hotfix (#184) to the
developline so the next minor doesn't regress (develop lacked the fix). Same change as the released commitfa3fa4d, plus docs.winn_http: each verb takes an optional options map —timeout/recv_timeout/connect_timeout(ms) andfollow_redirect; defaults raised to connect 15s / recv 30s. Backward compatible (original arities retained).docs/modules.md: new HTTP "Timeouts & options" section; CHANGELOG[Unreleased]entry.winn_m1_tests:exports_testpasses (original arities retained).The released hotfix is tag v0.9.4 (off
main).🤖 Generated with Claude Code