httpclient

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const EnvNameHttpPrefix = "EPCC_CLI_HTTP_HEADER_"

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 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 LogStats added in v0.7.0

func LogStats()

Types

This section is empty.

Jump to

Keyboard shortcuts

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