NewAuthorizationCredentialsFileRoundTripper adds the authorization credentials read from the provided file to a request unless the authorization header has already been set. This file is read for every request.
(authType, authCredentialsFile string, rt http.RoundTripper)
| 623 | // credentials read from the provided file to a request unless the authorization |
| 624 | // header has already been set. This file is read for every request. |
| 625 | func NewAuthorizationCredentialsFileRoundTripper(authType, authCredentialsFile string, rt http.RoundTripper) http.RoundTripper { |
| 626 | return &authorizationCredentialsFileRoundTripper{authType, authCredentialsFile, rt} |
| 627 | } |
| 628 | |
| 629 | func (rt *authorizationCredentialsFileRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { |
| 630 | if len(req.Header.Get("Authorization")) == 0 { |
no outgoing calls