Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FetchOptions ¶
type FetchOptions struct {
URL string
Data []byte
DataMap map[string]any
Params map[string]string
Headers map[string]string
Timeout int // seconds
Retry int // 重试次数
RetryDelay int // 重试次数延迟 seconds
Method string // 允许值:GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS(不区分大小写,会在 Do 中规范化为大写)
// MaxBodySize 限制读取响应体的最大字节数,0 表示不限制
MaxBodySize int64
// Proxy 可选:为本次请求使用的代理地址,例如 "http://127.0.0.1:7890"
Proxy string
}
FetchOptions 请求选项
Click to show internal directories.
Click to hide internal directories.