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:
4
go.mod
4
go.mod
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user