Documentation ¶
Overview ¶
Package http provides an easy way to construct an http client with custom certificates and customizable timeout. If you need to customize other attributes you can use the golang http package. https://golang.org/pkg/net/http/
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New creates a new http.Client with a custom certificate, which can be loaded from the passed CA Bundle file and/or directory. If both CABundleFile and CABundleDir are empty arguments, it creates an unsecure HTTP client.
func NewAcceptInvalidHostname ¶
func NewAcceptInvalidHostname(CABundleFile, CABundleDir string, httpTimeout time.Duration, hostname string) (*http.Client, error)
NewAcceptInvalidHostname new http.Client with ability to accept HTTPS certificates that don't match the hostname of the server they are connecting to.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.