Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUnsupportedEncoding = errors.New("unsupported encoding format")
ErrUnsupportedEncoding 表示不支持的编码格式
Functions ¶
Types ¶
type ContentWrapper ¶
type ContentWrapper struct {
// contains filtered or unexported fields
}
ContentWrapper 封装响应体的二进制数据,并提供链式解码功能
type Response ¶
type Response struct {
StatusCode int
Headers http.Header
Cookies []*http.Cookie
Proto string // 协议版本 (HTTP/1.1 或 HTTP/2.0)
// contains filtered or unexported fields
}
Response 表示 HTTP 响应
func NewResponse ¶
NewResponse 初始化 Response 对象并读取响应体
func (*Response) DecodeJSON ¶ added in v0.0.5
Click to show internal directories.
Click to hide internal directories.