@ -44,3 +44,14 @@ func (f *FollowRedirect) RoundTrip(req *stdhttp.Request) (*stdhttp.Response, err
}
return res, nil
type BasicAuthRoundTripper struct {
u, p string
next stdhttp.RoundTripper
func (bart *BasicAuthRoundTripper) RoundTrip(req *stdhttp.Request) (*stdhttp.Response, error) {
req.SetBasicAuth(bart.u, bart.p)
return bart.next.RoundTrip(req)