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.
11 lines
209 B
Modula-2
11 lines
209 B
Modula-2
module code.nochebuena.dev/go/httpclient
|
|
|
|
go 1.25
|
|
|
|
require (
|
|
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
|
|
)
|