httputil

package
v1.36.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2021 License: Apache-2.0 Imports: 11 Imported by: 14

Documentation

Index

Constants

View Source
const DefaultTimeout = 10 * time.Second

Variables

This section is empty.

Functions

func CreateTransport added in v1.28.0

func CreateTransport(auth *config.Auth, transportConfig *http.Transport, timeout time.Duration) (http.RoundTripper, error)

Creates a new HTTP Transport with TLS and Timeouts.

Please remember that setting long timeouts is not recommended as it can make idle connections stay open for as long as 2 * timeout. This should only be done in cases where you know the request is very likely going to be reused at some point in the near future.

func GetTLSConfig added in v1.31.0

func GetTLSConfig(auth *config.Auth) (*tls.Config, error)

func GuessKialiURL added in v1.19.0

func GuessKialiURL(r *http.Request) string

func HttpGet

func HttpGet(url string, auth *config.Auth, timeout time.Duration) ([]byte, int, error)

func HttpMethods added in v1.14.0

func HttpMethods() []string

Types

This section is empty.

Jump to

Keyboard shortcuts

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