Documentation ¶
Index ¶
- func ParseURL(rawURL string) (*url.URL, error)
- type Context
- func (ctx *Context) GetCookie() string
- func (ctx *Context) GetHeader(key string) string
- func (ctx *Context) GetHeaders() http.Header
- func (ctx *Context) SetAuth(val string)
- func (ctx *Context) SetAuthBearerToken(token string)
- func (ctx *Context) SetCookie(val string)
- func (ctx *Context) SetHeader(key, val string)
- func (ctx *Context) SetHeaders(headers map[string]string)
- func (ctx *Context) SetProxy(rawURL string) error
- func (ctx *Context) SetProxyCall(proxy func(*http.Request) (*url.URL, error)) (err error)
- type Gummy
- func (g *Gummy) Delete(rawURL string, parames ...interface{}) *Response
- func (g *Gummy) Get(rawURL string, parames ...interface{}) *Response
- func (g *Gummy) GetContext(host string) *Context
- func (g *Gummy) Post(rawURL string, parames ...interface{}) *Response
- func (g *Gummy) Put(rawURL string, parames ...interface{}) *Response
- func (g *Gummy) Request(method, rawURL string, parames ...interface{}) *Response
- func (g *Gummy) RequestURL(methon, rawURL string, parames ...interface{}) *Response
- func (g *Gummy) SetHeader(key, val string)
- func (g *Gummy) SetProxy(rawURL string) error
- type Response
- func (res *Response) Body() (body io.ReadCloser, err error)
- func (res *Response) Expect(contentTypes ...string) *Response
- func (res *Response) GetBytes() (code int, data []byte, err error)
- func (res *Response) GetDocument() (code int, dom *goquery.Document, err error)
- func (res *Response) GetJSON(v any) (code int, err error)
- func (res *Response) GetString() (code int, data string, err error)
- func (res *Response) Retry(ns ...int) *Response
- func (res *Response) Sleep(d time.Duration) *Response
- func (res *Response) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func (*Context) GetHeaders ¶
func (*Context) SetAuthBearerToken ¶
func (*Context) SetHeaders ¶
type Gummy ¶
type Gummy struct {
// contains filtered or unexported fields
}
func (*Gummy) GetContext ¶
func (*Gummy) RequestURL ¶
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
func (*Response) GetDocument ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.