utils

package
v1.10.9-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultProbeTimeout is the a timeout used in HTTPGetNTimes() and
	// HTTPGetRawNTimes() to avoid cases where early requests hang and
	// block all subsequent requests.
	DefaultProbeTimeout = 30 * time.Second
)

Variables

This section is empty.

Functions

func HTTPDelete

func HTTPDelete(url string) ([]byte, error)

HTTPDelete calls a given URL with the HTTP DELETE method.

func HTTPGet

func HTTPGet(url string) ([]byte, error)

HTTPGet is a helper to make GET request call to url

func HTTPGetNTimes

func HTTPGetNTimes(url string, n int) ([]byte, error)

HTTPGetNTimes calls the url n times and returns the first success or last error.

func HTTPPost

func HTTPPost(url string, data []byte) ([]byte, error)

HTTPPost is a helper to make POST request call to url

Types

This section is empty.

Jump to

Keyboard shortcuts

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