httputil

package
v0.0.28 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(proxyURL string, timeout time.Duration) *http.Client

NewClient creates an *http.Client with proxy and timeout configured.

func NewTransport

func NewTransport(proxyURL string) *http.Transport

NewTransport creates an http.Transport cloned from http.DefaultTransport with proxy configured. If proxyURL is empty, no proxy is set and Go's default behavior (HTTP_PROXY env var) applies. Invalid proxy URLs are silently ignored (proxy validation happens at the system settings layer).

func ResolveProxyURL

func ResolveProxyURL(urls ...string) string

ResolveProxyURL returns the first non-empty URL from the given list. Callers pass URLs in priority order (e.g., channel-level, DB setting, config file). Returns "" if all are empty, which tells Go's HTTP stack to fall back to the HTTP_PROXY / HTTPS_PROXY environment variables.

Types

This section is empty.

Jump to

Keyboard shortcuts

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