Documentation
¶
Index ¶
- Variables
- func AutomaticContentLength(enable bool)
- func AutomaticHostHeader(enable bool)
- func Do(req *http.Request) (*http.Response, error)
- func DoRaw(method, url, uripath string, headers map[string][]string, body io.Reader) (*http.Response, error)
- func Dor(req *retryablehttp.Request) (*http.Response, error)
- func Get(url string) (*http.Response, error)
- func Post(url string, mimetype string, r io.Reader) (*http.Response, error)
- type Client
- func (c *Client) Do(req *http.Request) (*http.Response, error)
- func (c *Client) DoRaw(method, url, uripath string, headers map[string][]string, body io.Reader) (*http.Response, error)
- func (c *Client) Dor(req *retryablehttp.Request) (*http.Response, error)
- func (c *Client) Get(url string) (*http.Response, error)
- func (c *Client) Head(url string) (*http.Response, error)
- func (c *Client) Post(url string, mimetype string, body io.Reader) (*http.Response, error)
- type Conn
- type Dialer
- type Options
- type PipelineClient
- func (c *PipelineClient) Do(req *http.Request) (*http.Response, error)
- func (c *PipelineClient) DoRaw(method, url, uripath string, headers map[string][]string, body io.Reader) (*http.Response, error)
- func (c *PipelineClient) Dor(req *retryablehttp.Request) (*http.Response, error)
- func (c *PipelineClient) Get(url string) (*http.Response, error)
- func (c *PipelineClient) Head(url string) (*http.Response, error)
- func (c *PipelineClient) Post(url string, mimetype string, body io.Reader) (*http.Response, error)
- type PipelineOptions
- type RedirectStatus
- type StatusError
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultClient = Client{ // contains filtered or unexported fields }
View Source
var DefaultOptions = Options{ Timeout: 30 * time.Second, FollowRedirects: true, MaxRedirects: 10, AutomaticHostHeader: true, AutomaticContentLength: true, }
View Source
var DefaultPipelineOptions = PipelineOptions{ Timeout: 30 * time.Second, MaxConnections: 5, AutomaticHostHeader: true, }
Functions ¶
func AutomaticContentLength ¶
func AutomaticContentLength(enable bool)
func AutomaticHostHeader ¶
func AutomaticHostHeader(enable bool)
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
type Dialer ¶
type Dialer interface {
// Dial dials a remote http server returning a Conn.
Dial(protocol, addr string) (Conn, error)
}
Dialer can dial a remote HTTP server.
type PipelineClient ¶
type PipelineClient struct {
// contains filtered or unexported fields
}
func NewPipelineClient ¶
func NewPipelineClient(options PipelineOptions) *PipelineClient
func (*PipelineClient) Dor ¶
func (c *PipelineClient) Dor(req *retryablehttp.Request) (*http.Response, error)
type PipelineOptions ¶
type RedirectStatus ¶
type StatusError ¶
func (*StatusError) Error ¶
func (s *StatusError) Error() string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.