Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRoundTripper ¶
func NewRoundTripper(original http.RoundTripper) http.RoundTripper
Types ¶
type HeaderRoundTripper ¶
type RoundTrip ¶
RoundTrip wraps a func to make it into a http.RoundTripper. Similar to http.HandleFunc.
type Tripperware ¶
type Tripperware func(rt http.RoundTripper) http.RoundTripper
Middleware func(rt http.RoundTripper) http.RoundTripper
func WithHeader ¶
func WithHeader(Header http.Header) Tripperware
WithHeader adds the given headers to each request. Example: roundtrip.Use(WithHeader(http.Header{"Authorization": []string{"Bearer 1234567890"}}))
Click to show internal directories.
Click to hide internal directories.