request

package
v0.3.11 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SkipAuth added in v0.3.6

func SkipAuth(req *http.Request)

Types

type AuthMode added in v0.2.4

type AuthMode string
const (
	AuthModeBasic  AuthMode = "basic"
	AuthModeBearer AuthMode = "bearer"
	SkipAuthHeader          = "X-Skip-Auth"
)

type AuthTransport

type AuthTransport struct {
	Manager conf.ManagerInterface
	Base    http.RoundTripper
	Cred    *conf.Credential
	Mode    AuthMode
	// contains filtered or unexported fields
}

func (*AuthTransport) NewAccessToken

func (t *AuthTransport) NewAccessToken(ctx context.Context) error

func (*AuthTransport) RoundTrip

func (t *AuthTransport) RoundTrip(req *http.Request) (*http.Response, error)

type Client added in v0.3.6

type Client struct {
	// contains filtered or unexported fields
}

func NewClient added in v0.3.6

func NewClient(
	logger *logs.Gen3Logger,
	cred *conf.Credential,
	manager conf.ManagerInterface,
	userAgent string,
	baseHTTPClient *http.Client,
	mode AuthMode,
) *Client

func (*Client) Do added in v0.3.6

func (c *Client) Do(req *http.Request) (*http.Response, error)

Do performs an HTTP request, retrying only bodyless GET, HEAD, and OPTIONS requests. The caller owns the response body.

func (*Client) Logger added in v0.3.6

func (c *Client) Logger() *logs.Gen3Logger

func (*Client) StandardClient added in v0.3.6

func (c *Client) StandardClient() *http.Client

type HTTPDoer added in v0.3.6

type HTTPDoer interface {
	Do(*http.Request) (*http.Response, error)
}

Jump to

Keyboard shortcuts

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