RoundTrip implements the RoundTripper interface.
(req *http.Request)
| 1978 | |
| 1979 | // RoundTrip implements the RoundTripper interface. |
| 1980 | func (t *BasicAuthTransport) RoundTrip(req *http.Request) (*http.Response, error) { |
| 1981 | req2 := setCredentialsAsHeaders(req, t.Username, t.Password) |
| 1982 | if t.OTP != "" { |
| 1983 | req2.Header.Set(headerOTP, t.OTP) |
| 1984 | } |
| 1985 | return t.transport().RoundTrip(req2) |
| 1986 | } |
| 1987 | |
| 1988 | // Client returns an *http.Client that makes requests that are authenticated |
| 1989 | // using HTTP Basic Authentication. |
nothing calls this directly
no test coverage detected