request

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetDefaultClient added in v0.8.3

func SetDefaultClient(client *Client)

func Wait added in v0.10.0

func Wait(ctx context.Context) error

Wait blocks until the package-level rate limiter allows another request. Callers that send HTTP requests outside of a Client method (e.g. via probe.Do) should call this first to keep proactive rate limiting.

Types

type Client added in v0.6.1

type Client struct {
	*http.Client
	Header  http.Header
	Cookies []*http.Cookie
}

func GetDefaultClient added in v0.8.3

func GetDefaultClient() *Client

func NewClient added in v0.6.1

func NewClient(opts NewClientOptions) *Client

func NewClientFromHTTPClient added in v0.9.0

func NewClientFromHTTPClient(httpClient *http.Client, limiter *rate.Limiter) *Client

func (*Client) ClearSecurityScheme added in v0.8.5

func (c *Client) ClearSecurityScheme(securityScheme *auth.SecurityScheme) *Client

func (*Client) ClearSecuritySchemes added in v0.8.5

func (c *Client) ClearSecuritySchemes(securitySchemes []*auth.SecurityScheme) *Client

func (*Client) WithCookies added in v0.6.1

func (c *Client) WithCookies(cookies []*http.Cookie) *Client

func (*Client) WithHeader added in v0.7.2

func (c *Client) WithHeader(header http.Header) *Client

type NewClientOptions added in v0.6.1

type NewClientOptions struct {
	Timeout            time.Duration
	RateLimit          int // requests per second
	ProxyURL           *url.URL
	InsecureSkipVerify bool

	Header  http.Header
	Cookies []*http.Cookie
}

Jump to

Keyboard shortcuts

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