Documentation
¶
Index ¶
- func CanPrint(content []byte) bool
- func CanPrintFast(content []byte) (string, bool)
- func Contains(slice []string, str string) bool
- func DecodeBody(body []byte, contentEncoding string) (decodedBody []byte, err error)
- func EncodeBody(body []byte, acceptEncodingHeader string) (encodedBody []byte, encoding string, err error)
- func HeaderString(headers http.Header) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanPrint ¶
CanPrint returns a bool if a byte array can be "printed" or written to a log file (filters binary data)
func CanPrintFast ¶
CanPrintFast is faster than CanPrint, but less accurate (it only checks the first chunk of the content)
func DecodeBody ¶
DecodeBody decompresses a byte array (response body) based on the content encoding
func EncodeBody ¶
func EncodeBody(body []byte, acceptEncodingHeader string) (encodedBody []byte, encoding string, err error)
EncodeBody compresses a string (the response body) based on the content-encoding header
func HeaderString ¶
HeaderString returns http.Header as a flat string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.