Documentation ¶
Overview ¶
Package client provides a client for making HTTP requests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { RequestURL(*url.URL) (*http.Response, error) Request(*url.URL, string, string, http.Header) (*http.Response, error) SetCheckRedirect(func(*http.Request, []*http.Request) error) }
Client is a thin wrapper around http.Client to make enhancements to support our use case.
type ClientFactory ¶
type ClientFactory interface {
Get() Client
}
A ClientFactory allows constructing HTTP Clients based on various Dialers or Transports.
type ProxyClientFactory ¶
type ProxyClientFactory struct {
// contains filtered or unexported fields
}
ProxyClientFactory uses the h12.io/socks package to support SOCKS proxies when transporting requests to the webserver.
func NewProxyClientFactory ¶
func NewProxyClientFactory(proxies []string, timeout time.Duration, agent string) (*ProxyClientFactory, error)
Create a ProxyClientFactory for the provided list of proxies.
func (*ProxyClientFactory) Get ¶
func (factory *ProxyClientFactory) Get() Client
Get a single client instance from the factory
func (*ProxyClientFactory) SetUsernamePassword ¶
func (factory *ProxyClientFactory) SetUsernamePassword(username, password string)
Click to show internal directories.
Click to hide internal directories.