Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an HTTP client that uses a sync.Pool to create new and reuse HTTP clients. It implements the [provisioner.HTTPClient] and Transporter interfaces. This is the HTTP client used by the provisioners.
func New ¶
New creates a new poolhttp Client, the sync.Pool will initialize a new *http.Client with the given function.
func (*Client) Do ¶
Do sends an HTTP request and returns an HTTP response, following policy (such as redirects, cookies, auth) as configured on the client.
func (*Client) Get ¶
Get issues a GET request to the specified URL. If the response is one of the following redirect codes, Get follows the redirect after calling the [Client.CheckRedirect] function:
type Transporter ¶
Transporter is implemented by custom HTTP clients with a method that returns an *http.Transport.