Documentation ¶
Index ¶
- func HttpDumpRequest(request *http.Request) []byte
- func HttpDumpResponse(response *http.Response) []byte
- type HttpClient
- func (c *HttpClient) AddFormData(key string, value string) *HttpClient
- func (c *HttpClient) AddParams(key string, value string) *HttpClient
- func (c *HttpClient) Clone() *HttpClient
- func (c *HttpClient) Debug(output *os.File) *HttpClient
- func (c *HttpClient) End() (resp *http.Response, body []byte, err error)
- func (c *HttpClient) EndStruct(value any, callbacks ...func(*http.Response) error) error
- func (c *HttpClient) Get(uri string) *HttpClient
- func (c *HttpClient) Post(uri string) *HttpClient
- func (c *HttpClient) Put(uri string) *HttpClient
- func (c *HttpClient) SendBody(body io.Reader) *HttpClient
- func (c *HttpClient) SetContentType(contentType string) *HttpClient
- func (c *HttpClient) SetCookies(cookies []*http.Cookie) *HttpClient
- func (c *HttpClient) SetHeader(key string, value string) *HttpClient
- func (c *HttpClient) SetParams(key string, value string) *HttpClient
- func (c *HttpClient) SetUserAgent(ua string) *HttpClient
- func (c *HttpClient) SetWbiKey(wbiKey string) *HttpClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HttpDumpRequest ¶
func HttpDumpResponse ¶
Types ¶
type HttpClient ¶
type HttpClient struct {
// contains filtered or unexported fields
}
func NewHttpClient ¶
func NewHttpClient(client *http.Client) *HttpClient
func (*HttpClient) AddFormData ¶
func (c *HttpClient) AddFormData(key string, value string) *HttpClient
func (*HttpClient) AddParams ¶
func (c *HttpClient) AddParams(key string, value string) *HttpClient
func (*HttpClient) Clone ¶
func (c *HttpClient) Clone() *HttpClient
func (*HttpClient) Debug ¶
func (c *HttpClient) Debug(output *os.File) *HttpClient
func (*HttpClient) Get ¶
func (c *HttpClient) Get(uri string) *HttpClient
func (*HttpClient) Post ¶
func (c *HttpClient) Post(uri string) *HttpClient
func (*HttpClient) Put ¶
func (c *HttpClient) Put(uri string) *HttpClient
func (*HttpClient) SendBody ¶
func (c *HttpClient) SendBody(body io.Reader) *HttpClient
func (*HttpClient) SetContentType ¶
func (c *HttpClient) SetContentType(contentType string) *HttpClient
func (*HttpClient) SetCookies ¶
func (c *HttpClient) SetCookies(cookies []*http.Cookie) *HttpClient
func (*HttpClient) SetHeader ¶
func (c *HttpClient) SetHeader(key string, value string) *HttpClient
func (*HttpClient) SetParams ¶
func (c *HttpClient) SetParams(key string, value string) *HttpClient
func (*HttpClient) SetUserAgent ¶
func (c *HttpClient) SetUserAgent(ua string) *HttpClient
func (*HttpClient) SetWbiKey ¶ added in v0.2.6
func (c *HttpClient) SetWbiKey(wbiKey string) *HttpClient
Click to show internal directories.
Click to hide internal directories.