Documentation
¶
Index ¶
- Constants
- Variables
- func CheckBodySize(size int64) bool
- type Client
- func (c *Client) Do(req *Request) (*Response, error)
- func (c *Client) FastDo(req *fasthttp.Request) (*fasthttp.Response, error)
- func (c *Client) ReqDo(httpReq *http.Request) (*http.Response, error)
- func (c *Client) StandardDo(req *http.Request) (*http.Response, error)
- func (c *Client) TransToCheck()
- type ClientConfig
- type Request
- type RequestConfig
- type Response
Constants ¶
View Source
const ( Auto = iota FAST STANDARD REQ )
View Source
const FuzzMarker = "{{FUZZ}}"
Variables ¶
View Source
var (
DefaultMaxBodySize int64 = 1024 * 100 // 100k
)
Functions ¶
func CheckBodySize ¶
Types ¶
type Client ¶
type Client struct {
*ClientConfig
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(config *ClientConfig) *Client
func (*Client) TransToCheck ¶
func (c *Client) TransToCheck()
type ClientConfig ¶
type RequestConfig ¶
type RequestConfig struct {
Method string
Headers http.Header
Host string
Path string
Body []byte
RawQuery string
RandomUserAgent bool
}
RequestConfig 封装HTTP请求相关的配置参数
type Response ¶
type Response struct {
StandardResponse *http.Response
FastResponse *fasthttp.Response
ClientType int
}
func (*Response) ContentLength ¶
func (*Response) ContentType ¶
func (*Response) StatusCode ¶
Click to show internal directories.
Click to hide internal directories.