Documentation ¶
Index ¶
- func WithBaseURL(baseURL string) *core.BaseURLOption
- func WithBodyProperties(bodyProperties map[string]interface{}) *core.BodyPropertiesOption
- func WithClientName(clientName *string) *core.ClientNameOption
- func WithHTTPClient(httpClient core.HTTPClient) *core.HTTPClientOption
- func WithHTTPHeader(httpHeader http.Header) *core.HTTPHeaderOption
- func WithMaxAttempts(attempts uint) *core.MaxAttemptsOption
- func WithQueryParameters(queryParameters url.Values) *core.QueryParametersOption
- func WithToken(token string) *core.TokenOption
- type RequestOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithBaseURL ¶
func WithBaseURL(baseURL string) *core.BaseURLOption
WithBaseURL sets the base URL, overriding the default environment, if any.
func WithBodyProperties ¶ added in v2.12.0
func WithBodyProperties(bodyProperties map[string]interface{}) *core.BodyPropertiesOption
WithBodyProperties adds the given body properties to the request.
func WithClientName ¶
func WithClientName(clientName *string) *core.ClientNameOption
WithClientName sets the clientName request header.
The name of the project that is making the request.
func WithHTTPClient ¶
func WithHTTPClient(httpClient core.HTTPClient) *core.HTTPClientOption
WithHTTPClient uses the given HTTPClient to issue the request.
func WithHTTPHeader ¶
func WithHTTPHeader(httpHeader http.Header) *core.HTTPHeaderOption
WithHTTPHeader adds the given http.Header to the request.
func WithMaxAttempts ¶
func WithMaxAttempts(attempts uint) *core.MaxAttemptsOption
WithMaxAttempts configures the maximum number of retry attempts.
func WithQueryParameters ¶ added in v2.12.0
func WithQueryParameters(queryParameters url.Values) *core.QueryParametersOption
WithQueryParameters adds the given query parameters to the request.
func WithToken ¶
func WithToken(token string) *core.TokenOption
WithToken sets the 'Authorization: Bearer <token>' request header.
Types ¶
type RequestOption ¶
type RequestOption = core.RequestOption
RequestOption adapts the behavior of an indivdual request.
Click to show internal directories.
Click to hide internal directories.