Documentation ¶
Index ¶
- Constants
- func WrapResponseBodyIfNeeded(res *http.Response, req *http.Request, dump *Dumper)
- type Dumper
- func (d *Dumper) Clone() *Dumper
- func (d *Dumper) DumpDefault(p []byte)
- func (d *Dumper) DumpRequestBody(p []byte)
- func (d *Dumper) DumpRequestHeader(p []byte)
- func (d *Dumper) DumpResponseBody(p []byte)
- func (d *Dumper) DumpResponseHeader(p []byte)
- func (d *Dumper) DumpTo(p []byte, output io.Writer)
- func (d *Dumper) SetOptions(opt Options)
- func (d *Dumper) Start()
- func (d *Dumper) Stop()
- func (d *Dumper) WrapRequestBodyWriteCloser(rc io.WriteCloser) io.WriteCloser
- func (d *Dumper) WrapRequestBodyWriter(w io.Writer) io.Writer
- func (d *Dumper) WrapRequestHeaderWriter(w io.Writer) io.Writer
- func (d *Dumper) WrapResponseBodyReadCloser(rc io.ReadCloser) io.ReadCloser
- type Dumpers
- type Options
Constants ¶
View Source
const DumperKey dumperKeyType = iota
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Dumper ¶
type Dumper struct { Options // contains filtered or unexported fields }
Dumper is the dump tool.
func (*Dumper) DumpDefault ¶
func (*Dumper) DumpRequestBody ¶
func (*Dumper) DumpRequestHeader ¶
func (*Dumper) DumpResponseBody ¶
func (*Dumper) DumpResponseHeader ¶
func (*Dumper) SetOptions ¶
func (*Dumper) WrapRequestBodyWriteCloser ¶
func (d *Dumper) WrapRequestBodyWriteCloser(rc io.WriteCloser) io.WriteCloser
func (*Dumper) WrapRequestBodyWriter ¶
func (*Dumper) WrapRequestHeaderWriter ¶
func (*Dumper) WrapResponseBodyReadCloser ¶
func (d *Dumper) WrapResponseBodyReadCloser(rc io.ReadCloser) io.ReadCloser
type Dumpers ¶
type Dumpers []*Dumper
Dumpers is an array of Dumpper
func GetResponseHeaderDumpers ¶
GetResponseHeaderDumpers return Dumpers which need dump response header.
func (Dumpers) DumpResponseHeader ¶
func (Dumpers) ShouldDump ¶
ShouldDump is true if Dumper is not empty.
type Options ¶
type Options interface { Output() io.Writer RequestHeaderOutput() io.Writer RequestBodyOutput() io.Writer ResponseHeaderOutput() io.Writer ResponseBodyOutput() io.Writer RequestHeader() bool RequestBody() bool ResponseHeader() bool ResponseBody() bool Async() bool Clone() Options }
Options controls the dump behavior.
Click to show internal directories.
Click to hide internal directories.