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