option

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2024 License: Apache-2.0 Imports: 3 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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

func WithBodyProperties(bodyProperties map[string]interface{}) *core.BodyPropertiesOption

WithBodyProperties adds the given body properties to 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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL