httpclient

package
v0.53.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProxyEnvironmentVariables = []string{
	"HTTPS_PROXY",
	"https_proxy",
	"HTTP_PROXY",
	"http_proxy",
}

ProxyEnvironmentVariables defines the order of preference for proxy environment variables Following standard conventions used by curl, wget, and other tools

Functions

func IsProxyConfigured

func IsProxyConfigured() bool

IsProxyConfigured returns true if any proxy environment variable is set

func NewHTTPClientWithProxy

func NewHTTPClientWithProxy(timeout time.Duration) *http.Client

NewHTTPClientWithProxy creates an HTTP client with optional proxy support Only configures proxy if environment variables are set Uses standard proxy environment variables in order of preference

func NewHTTPClientWithProxyAndLogger

func NewHTTPClientWithProxyAndLogger(timeout time.Duration, logger *logrus.Logger) *http.Client

NewHTTPClientWithProxyAndLogger creates an HTTP client with optional proxy support and logging

Types

This section is empty.

Jump to

Keyboard shortcuts

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