WithHeader sets a header on the request, taking precedence over any header of the same name that the underlying transport would otherwise supply.
(name, value string)
| 66 | // WithHeader sets a header on the request, taking precedence over any header of the same name |
| 67 | // that the underlying transport would otherwise supply. |
| 68 | func WithHeader(name, value string) RequestOption { |
| 69 | return func(cfg *requestConfig) { |
| 70 | cfg.headers[name] = value |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | // WithoutFollowingRedirects stops the request from following redirects. When a redirect is |
| 75 | // encountered, the request fails with an HTTPError carrying the redirect status code and headers |
no outgoing calls