Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/imjasonh/transports
HTTP transports I find myself using a lot
https://github.com/imjasonh/transports
Last synced: about 1 month 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 (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-08-10T18:05:31.000Z (over 9 years ago)
- Last Synced: 2024-10-14T16:51:30.692Z (3 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
===[![GoDoc](https://godoc.org/github.com/ImJasonH/transports/bearer?status.svg)](https://godoc.org/github.com/ImJasonH/transports/bearer)
This package provides an `http.RoundTripper` that sets a bearer authorization
token on all requests.logging
===[![GoDoc](https://godoc.org/github.com/ImJasonH/transports/logging?status.svg)](https://godoc.org/github.com/ImJasonH/transports/logging)
This package provides an `http.RoundTripper` that logs all requests it makes.
fn
===[![GoDoc](https://godoc.org/github.com/ImJasonH/transports/fn?status.svg)](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.
})
}
```