Excited to announce the first release of httpc, a lightweight library designed to enhance HTTP client functionality through middleware support.
Features
- Middleware: chain HTTP request with middleware
- Client wrapper: wrap standard
http.Client
with middleware - RoundTripper wrapper: customizing the
http.RoundTripper
with middleware layers
Built-In Middlewares
Recover
: recovers from panics within middlewaresStripSlashes
: removes trailing slashes in the request URLTimeout
: sets request timeoutSecure
: ensures secure connectionsAuthorization
: adds basic, bearer, or custom authorization headersContentType
,Accept
,User-Agent
,SetHeader
: sets common header for requests
Install with:
go get github.com/kraciasty/httpc@v0.1.0
Check the README for more details.
This sets the foundation for future improvements. Feedback and contributions are welcome!
Full Changelog: /~https://github.com/kraciasty/httpc/commits/v0.1.0