Repository navigation
Use generic methods directly on your configured client. client.Get[Order](ctx, path) decodes an order into a Go type. For writes, client.Post[Order](ctx, path, input) takes the response type and accepts the body as a value.
go get github.com/goforj/httpclient@v0.3.0Requires Go 1.27 or newer.
What's better
- The GitHub API quick start takes you from installation to a decoded response.
- A runnable retry example shows a 503 followed by a successful response in two attempts using the recording transport.
- The README explains typed HTTP errors, streaming responses, and what request dumps contain. The examples report errors and show the output to expect.
Upgrading
The seven package-level HTTP verb functions are removed. Replace httpclient.Get[Order](ctx, client, path) with client.Get[Order](ctx, path). For Post, Put, and Patch, specify the response type and pass the body as a value. Use httpclient.Default() when you need the shared client.