WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
(doer HttpRequestDoer)
| 181 | // WithHTTPClient allows overriding the default Doer, which is |
| 182 | // automatically created using http.Client. This is useful for tests. |
| 183 | func WithHTTPClient(doer HttpRequestDoer) ClientOption { |
| 184 | return func(c *Client) error { |
| 185 | c.Client = doer |
| 186 | return nil |
| 187 | } |
| 188 | } |
| 189 | |
| 190 | // WithRequestEditorFn allows setting up a callback function, which will be |
| 191 | // called right before sending the request. This can be used to mutate the request. |
nothing calls this directly
no outgoing calls
no test coverage detected