https://github.com/imjasonh/transports
HTTP transports I find myself using a lot
https://github.com/imjasonh/transports
Last synced: 4 months ago
JSON representation
HTTP transports I find myself using a lot
- Host: GitHub
- URL: https://github.com/imjasonh/transports
- Owner: imjasonh
- Created: 2015-07-16T21:59:08.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-08-10T18:05:31.000Z (almost 10 years ago)
- Last Synced: 2025-01-25T08:11:47.931Z (6 months ago)
- Language: Go
- Size: 125 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This repo provides HTTP RoundTrippers I find myself reimplementing all the time.
bearer
===[](https://godoc.org/github.com/ImJasonH/transports/bearer)
This package provides an `http.RoundTripper` that sets a bearer authorization
token on all requests.logging
===[](https://godoc.org/github.com/ImJasonH/transports/logging)
This package provides an `http.RoundTripper` that logs all requests it makes.
fn
===[](https://godoc.org/github.com/ImJasonH/transports/fn)
This package provides a func to create an `http.RoundTripper` from a func.
```
client := &http.Client{
Transport: fn.RoundTripperFunc(func(r *http.Request) (*http.Response, error) {
// this func is called when the client RoundTrips.
})
}
```