NewUserAgentRoundTripper adds the user agent every request header.
(userAgent string, rt http.RoundTripper)
| 1170 | |
| 1171 | // NewUserAgentRoundTripper adds the user agent every request header. |
| 1172 | func NewUserAgentRoundTripper(userAgent string, rt http.RoundTripper) http.RoundTripper { |
| 1173 | return &userAgentRoundTripper{userAgent, rt} |
| 1174 | } |
| 1175 | |
| 1176 | func (rt *userAgentRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { |
| 1177 | req = cloneRequest(req) |
no outgoing calls
no test coverage detected