http

package
v1.8.9 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvRetryMax         = "CD_K8SCLIENT_RETRY_MAX"
	EnvRetryBaseBackoff = "CD_K8SCLIENT_RETRY_BASE_BACKOFF"
)

Variables

This section is empty.

Functions

func JoinCookies added in v1.8.8

func JoinCookies(key string, cookieList []*http.Cookie) (string, error)

JoinCookies combines chunks of cookie based on key as prefix. It returns cookie value as string. cookieString is of format key1=value1; key2=value2; key3=value3 first chunk will be of format cd.token=<numberOfChunks>:token; attributes

func MakeCookieMetadata

func MakeCookieMetadata(key, value string, flags ...string) ([]string, error)

MakeCookieMetadata generates a string representing a Web cookie. Yum!

func SetTokenCookie added in v1.8.8

func SetTokenCookie(token string, baseHRef string, isSecure bool, w http.ResponseWriter) error

func WithRetry added in v1.8.8

func WithRetry(maxRetries int64, baseRetryBackoff time.Duration) transport.WrapperFunc

Types

type DebugTransport added in v0.11.2

type DebugTransport struct {
	T http.RoundTripper
}

DebugTransport is a HTTP Client Transport to enable debugging

func (DebugTransport) RoundTrip added in v0.11.2

func (d DebugTransport) RoundTrip(req *http.Request) (*http.Response, error)

type TransportWithHeader added in v1.8.8

type TransportWithHeader struct {
	RoundTripper http.RoundTripper
	Header       http.Header
}

TransportWithHeader is a HTTP Client Transport with default headers.

func (*TransportWithHeader) RoundTrip added in v1.8.8

func (rt *TransportWithHeader) RoundTrip(r *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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