cookiejar

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CookiesFromHeader

func CookiesFromHeader(header http.Header) []*http.Cookie

Utility function to convert cookies from http.Header to []*http.Cookie. This can be useful if cookies are stored in http.Header (e.g., from a response).

func ParseCookieHeader

func ParseCookieHeader(header string) *http.Cookie

ParseCookieHeader parses a single Set-Cookie header and returns an *http.Cookie.

func RedactSensitiveCookies

func RedactSensitiveCookies(cookies []*http.Cookie) []*http.Cookie

RedactSensitiveCookies redacts sensitive information from cookies. It takes a slice of *http.Cookie and returns a redacted slice of *http.Cookie.

func SetupCookieJar

func SetupCookieJar(client *http.Client, enableCookieJar bool, log logger.Logger) error

SetupCookieJar initializes the HTTP client with a cookie jar if enabled in the configuration.

Types

This section is empty.

Jump to

Keyboard shortcuts

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