Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( POST = "POST" GET = "GET" PUT = "PUT" DELETE = "DELETE" OPTIONS = "OPTIONS" HTTP = "HTTP" HTTPS = "HTTPS" TCP = "TCP" WEBSOCKET = "WEBSOCKET" WEBSOCKETS = "WEBSOCKETS" ErrRequest = -1 // 请求失败 ErrCheck = -2 // 校验失败 )
View Source
var CH = make(chan *Response, 1000)
View Source
var ConcurrencyMap = &CMap{ TN: 0, CN: 0, mutex: sync.RWMutex{}, }
Functions ¶
This section is empty.
Types ¶
type Request ¶
type Request struct { URL string // 请求地址 Scheme string // 请求类型 HTTP/ WEBSOCKET/ TCP Method string // 请求方法 GET/ POST/ PUT/ DELETE/ OPTIONS Headers map[string]string // 请求头 Headers Body string // 请求体 body Cookies []*http.Cookie Verify func([]byte) bool // 验证的方法 Timeout time.Duration // 请求超时时间 Debug bool // 是否开启Debug模式 MaxCon int // 每个连接的请求数 SSL bool // 证书验证 Keepalive bool // 是否开启长连接 Redirect bool // 是否重定向 GlobFun func(http.Response) map[string]any // 全局变量 // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.