Documentation ¶
Index ¶
- type Client
- func (c *Client) Do(req *http.Request) (resp *http.Response, err error)
- func (c *Client) Get(url string) (resp *http.Response, err error)
- func (c *Client) Head(url string) (resp *http.Response, err error)
- func (c *Client) Jar(j *cookiejar.Jar) *Client
- func (c *Client) Post(url string, bodyType string, body io.Reader) (resp *http.Response, err error)
- func (c *Client) PostForm(url string, data url.Values) (resp *http.Response, err error)
- func (c *Client) Timeout(t time.Duration) *Client
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 a wrapper to http.client. It is used as builder to construct the real http client
func NewClient ¶
NewClient creates and initializes a new goha http client that will be able to authorize its requests via Basic / Digest authentication scheme.
func NewClientWithTransport ¶
func NewClientWithTransport(username, password string, transport http.RoundTripper) *Client
NewClient creates a new goha http client with provided http.Transport
Click to show internal directories.
Click to hide internal directories.