NewApiKeyQueryParamAuthHTTPClient returns a new http client, with automatic API key authentication. Specifically this means that the client will automatically add the API key (as a query param) to every request.
( //nolint:ireturn ctx context.Context, queryParamName, apiKey string, opts ...QueryParamAuthClientOption, )
| 24 | // authentication. Specifically this means that the client will automatically |
| 25 | // add the API key (as a query param) to every request. |
| 26 | func NewApiKeyQueryParamAuthHTTPClient( //nolint:ireturn |
| 27 | ctx context.Context, |
| 28 | queryParamName, apiKey string, |
| 29 | opts ...QueryParamAuthClientOption, |
| 30 | ) (AuthenticatedHTTPClient, error) { |
| 31 | return NewQueryParamAuthHTTPClient(ctx, append(opts, WithQueryParams(QueryParam{ |
| 32 | Key: queryParamName, |
| 33 | Value: apiKey, |
| 34 | }))...) |
| 35 | } |
no test coverage detected