MCPcopy Index your code
hub / github.com/google/go-github / RoundTrip

Method RoundTrip

github/github.go:1980–1986  ·  view source on GitHub ↗

RoundTrip implements the RoundTripper interface.

(req *http.Request)

Source from the content-addressed store, hash-verified

1978
1979// RoundTrip implements the RoundTripper interface.
1980func (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.

Callers

nothing calls this directly

Calls 3

transportMethod · 0.95
setCredentialsAsHeadersFunction · 0.85
RoundTripMethod · 0.45

Tested by

no test coverage detected