httpclient

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2025 License: MIT Imports: 25 Imported by: ? 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

View Source
const EnvDisableTLS = "EPCC_CLI_DISABLE_TLS_VERIFICATION"
View Source
const EnvNameHttpPrefix = "EPCC_CLI_HTTP_HEADER_"
View Source
const EnvUrlMatch = "EPCC_CLI_URL_MATCH_REGEXP_(\\d+)"
View Source
const EnvUrlMatchPrefix = "EPCC_CLI_URL_MATCH_SUBSTITUTION_"

Variables

View Source
var DontLog2xxs = false
View Source
var HttpClient = &http.Client{}
View Source
var Limit *rate.Limiter = nil
View Source
var RawHeaders []string
View Source
var Retry429 = false
View Source
var Retry5xx = false
View Source
var RetryAllErrors = false
View Source
var RetryConnectionErrors = false
View Source
var RetryDelay uint = 500
View Source
var UserAgent = fmt.Sprintf("epcc-cli/%s-%s (%s/%s)", version.Version, version.Commit, runtime.GOOS, runtime.GOARCH)

Functions

func AddAdditionalHeadersSpecifiedByFlag added in v0.8.1

func AddAdditionalHeadersSpecifiedByFlag(r *http.Request) error

func DoFileRequest

func DoFileRequest(ctx context.Context, path string, payload io.Reader, contentType string) (response *http.Response, error error)

func DoRequest

func DoRequest(ctx context.Context, method string, path string, query string, payload io.Reader) (response *http.Response, error error)

func Initialize added in v0.10.0

func Initialize(rateLimit uint16, requestTimeout float32, statisticsFrequency int)

func LogStats added in v0.7.0

func LogStats()

Types

type HttpParameterOverrides added in v0.10.0

type HttpParameterOverrides struct {
	QueryParameters []string
	OverrideUrlPath string
}

Jump to

Keyboard shortcuts

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