feat(httpclient)!: promote to v1.0.0 — retry-on-429 with Retry-After, DoJSONRequest, bump deps

Extend retry loop to handle HTTP 429 Too Many Requests: when the server includes a
Retry-After header, that duration is used as the retry delay; otherwise falls back to
the configured BackOffDelay. Add DoJSONRequest[Req, Resp] free function that serialises
the request body as JSON, sets Content-Type, and delegates response decoding to DoJSON.
Bump logz and xerrors from v0.9.0 to v1.0.0. API committed as stable.
This commit is contained in:
2026-05-11 19:50:16 -06:00
parent 6026ab8a5e
commit 962b0ccf17
6 changed files with 148 additions and 7 deletions

4
go.mod
View File

@@ -3,8 +3,8 @@ module code.nochebuena.dev/go/httpclient
go 1.25
require (
code.nochebuena.dev/go/logz v0.9.0
code.nochebuena.dev/go/xerrors v0.9.0
code.nochebuena.dev/go/logz v1.0.0
code.nochebuena.dev/go/xerrors v1.0.0
github.com/avast/retry-go/v4 v4.3.4
github.com/sony/gobreaker v1.0.0
)