httpclient

package
v0.0.0-...-eb33cdb Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(config Config) (*http.Client, error)

func NewTransport

func NewTransport(tlsConfig *tls.Config) *http.Transport

func NewWithTransport

func NewWithTransport(transport *http.Transport, timeout time.Duration) *http.Client

Types

type Config

type Config struct {
	// InsecureSkipVerify determine wheter to use tls.Config InsecureSkipVerify or not.
	// Setting this to true is generally not recommended. Defaults to false.
	InsecureSkipVerify bool
	// CACerts list of custom CA certificates that we need to trust. This certificates
	// will be appended to host root CA if possible.
	CACerts []string
	// Timeout specifies http.Client timeout. If value is zero, will use default value
	// of 30 seconds.
	Timeout time.Duration
}

Jump to

Keyboard shortcuts

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