1
0
Fork 0
mirror of https://github.com/imjasonh/transports synced 2026-07-07 00:23:07 +00:00
No description
Find a file
2015-08-10 14:05:27 -04:00
bearer update docs, add readme 2015-07-17 13:00:32 -04:00
fn Add RoundTripperFunc 2015-08-10 14:01:05 -04:00
logging update docs, add readme 2015-07-17 13:00:32 -04:00
README.md update README 2015-08-10 14:05:27 -04:00

This repo provides HTTP RoundTrippers I find myself reimplementing all the time.

bearer

GoDoc

This package provides an http.RoundTripper that sets a bearer authorization token on all requests.

logging

GoDoc

This package provides an http.RoundTripper that logs all requests it makes.

fn

GoDoc

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.
  })
}