Documentation ¶
Index ¶
- func CustomPayload(data []byte, mimeType string) client.Payload
- func WwwFormPayload(s string) client.Payload
- type ClientImpl
- func (c *ClientImpl) CallApi(spec client.ApiSpec, context context.Context) (err error)
- func (c *ClientImpl) ExportCookies(url string) map[string]string
- func (c *ClientImpl) Get(url string, headers map[string]string, context context.Context) (body io.ReadCloser, err error)
- func (c *ClientImpl) GetUserAgent() string
- func (c *ClientImpl) ImportCookies(cookies map[string]string, domains ...string)
- func (c *ClientImpl) SetUserAgent(name string)
- type Valve
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CustomPayload ¶
CustomPayload constructs payload with given data and MIME type.
func WwwFormPayload ¶
WwwFormPayload constructs a www URL-encoded form payload.
Types ¶
type ClientImpl ¶
type ClientImpl struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(hc plugin.HttpClient, cdMin uint, cdMax uint) *ClientImpl
func (*ClientImpl) ExportCookies ¶
func (c *ClientImpl) ExportCookies(url string) map[string]string
func (*ClientImpl) Get ¶
func (c *ClientImpl) Get( url string, headers map[string]string, context context.Context, ) (body io.ReadCloser, err error)
func (*ClientImpl) GetUserAgent ¶
func (c *ClientImpl) GetUserAgent() string
func (*ClientImpl) ImportCookies ¶
func (c *ClientImpl) ImportCookies(cookies map[string]string, domains ...string)
func (*ClientImpl) SetUserAgent ¶
func (c *ClientImpl) SetUserAgent(name string)
Click to show internal directories.
Click to hide internal directories.