WithoutFollowingRedirects stops the request from following redirects. When a redirect is encountered, the request fails with an HTTPError carrying the redirect status code and headers rather than following the redirect. This matters for requests where following a redirect silently changes the meanin
()
| 81 | // This option applies only to the REST request surface (Request and RequestWithContext). It has no |
| 82 | // effect on GraphQL methods, which do not encounter redirects in practice. |
| 83 | func WithoutFollowingRedirects() RequestOption { |
| 84 | return func(cfg *requestConfig) { |
| 85 | cfg.noFollowRedirects = true |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | // WithEndpointScopes adds OAuth scopes to a 4xx error as if the server endpoint had returned them. |
| 90 | // This improves error messaging for endpoints that do not explicitly list the scopes they need, and |
no outgoing calls