Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RoundTrippers ¶
func RoundTrippers(base http.RoundTripper, parents ...RoundTripper) http.RoundTripper
RoundTrippers will collect many RoundTripper interfaces and return one that contains them all.
Types ¶
type Debugger ¶
type Debugger struct { http.RoundTripper SkipBody bool // contains filtered or unexported fields }
Debugger is a RoundTripper that prints debug info about http requests and responses.
func (*Debugger) Unwrap ¶
func (d *Debugger) Unwrap() http.RoundTripper
func (*Debugger) Wrap ¶
func (d *Debugger) Wrap(rt http.RoundTripper) RoundTripper
type HttpMock ¶
type HttpMock struct {
// contains filtered or unexported fields
}
func (*HttpMock) Unwrap ¶
func (m *HttpMock) Unwrap() http.RoundTripper
func (*HttpMock) Wrap ¶
func (m *HttpMock) Wrap(rt http.RoundTripper) RoundTripper
type RoundTripper ¶
type RoundTripper interface { http.RoundTripper Wrap(http.RoundTripper) RoundTripper Unwrap() http.RoundTripper }
type RoundTripperFunc ¶
type UserAgent ¶
type UserAgent struct { UserAgent string // contains filtered or unexported fields }
func NewUserAgent ¶
func (*UserAgent) Unwrap ¶
func (uat *UserAgent) Unwrap() http.RoundTripper
func (*UserAgent) Wrap ¶
func (uat *UserAgent) Wrap(rt http.RoundTripper) RoundTripper
Click to show internal directories.
Click to hide internal directories.