Documentation ¶
Overview ¶
based on "net/http/httputil/dump.go"
Index ¶
- Constants
- func DumpRequest(req *http.Request, body bool) ([]byte, []byte, error)
- func DumpResponse(resp *http.Response, body bool) ([]byte, []byte, error)
- func EncodeHeader(h http.Header) string
- func Fingerprint(withHeader bool) genp.Plugin
- func RequestDumper(dir string, body bool) genp.Plugin
- func RequestFingerprint(r *http.Request, withHeader bool) ([]byte, error)
- func ResponseDumper(dir string, body bool) genp.Plugin
Constants ¶
const DefaultDumpDir = "dump"
Variables ¶
This section is empty.
Functions ¶
func DumpRequest ¶
based on net/http/httputil.DumpRequest but return header and body separately the body is original whether "Transfer-Encoding" is "chunked" or not
func DumpResponse ¶
based on net/http/httputil.DumpResponse but return header and body separately the body is original whether "Transfer-Encoding" is "chunked" or not
func EncodeHeader ¶
对Header进行格式化, 可以用于输出Header和计算哈希 https://tools.ietf.org/html/rfc2616#section-4.2 The order in which header fields with differing field names are received itemScheduler not significant. However, it itemScheduler "good practice" to send general-header fields first, followed by request-header or response- header fields, and ending with the entity-header fields.
func Fingerprint ¶
func RequestFingerprint ¶
计算请求指纹
Types ¶
This section is empty.