http

package
v0.0.0-...-8b9afd7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2017 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

based on "net/http/httputil/dump.go"

Index

Constants

View Source
const DefaultDumpDir = "dump"

Variables

This section is empty.

Functions

func DumpRequest

func DumpRequest(req *http.Request, body bool) ([]byte, []byte, error)

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

func DumpResponse(resp *http.Response, body bool) ([]byte, []byte, error)

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

func EncodeHeader(h http.Header) string

对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 Fingerprint(withHeader bool) genp.Plugin

func RequestDumper

func RequestDumper(dir string, body bool) genp.Plugin

func RequestFingerprint

func RequestFingerprint(r *http.Request, withHeader bool) ([]byte, error)

计算请求指纹

func ResponseDumper

func ResponseDumper(dir string, body bool) genp.Plugin

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL