http

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Do

func Do(
	ctx context.Context,
	httpClient *http.Client,
	method, url string,
	headers map[string]string,
	requestBody io.Reader) ([]byte, error)

func NewClient added in v0.6.0

func NewClient(rootCAs *x509.CertPool, certs ...tls.Certificate) (*http.Client, error)

NewClient creates an *http.Client that clones http.DefaultTransport settings and applies the given TLS configuration. This avoids duplicating transport setup across provider, auth, and crypto packages.

func PreviewBodyForError added in v0.7.0

func PreviewBodyForError(body []byte) string

PreviewBodyForError returns a short, single-line representation of body for use in error messages. Long bodies are truncated with a total byte count.

func SanitizeRequestURL added in v0.7.0

func SanitizeRequestURL(raw string) string

SanitizeRequestURL strips query and fragment from a URL string so secrets in query parameters are less likely to appear in error messages. If parsing fails, the string is truncated to a safe length.

Types

This section is empty.

Jump to

Keyboard shortcuts

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