MCPcopy Create free account
hub / github.com/MarioCarrion/todo-api-microservice-example / WithHTTPClient

Function WithHTTPClient

client.gen.go:183–188  ·  view source on GitHub ↗

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

(doer HttpRequestDoer)

Source from the content-addressed store, hash-verified

181// WithHTTPClient allows overriding the default Doer, which is
182// automatically created using http.Client. This is useful for tests.
183func 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.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected