http

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(options ...Option) (*http.Client, error)

Types

type Option

type Option func(c *config)

Option is a configuration option for the HTTP client.

func WithExtraCertificates

func WithExtraCertificates(path string) Option

WithExtraCertificates adds more certificates to the pool of certificates trusted by this client. path is the path to a PEM file containing one or more certificates. If path is empty or the file at path does not exist, no certificates are added to the pool.

func WithTLSSkipVerify

func WithTLSSkipVerify(tlsSkipVerify bool) Option

WithTLSSkipVerify enables or disables the verification of the server TLS certificates. This option defaults to false.

Jump to

Keyboard shortcuts

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