Documentation ¶
Overview ¶
Package speakhttp provides methods of pretty printing http packets
Index ¶
- Variables
- func ColorRequest(req *http.Request)
- func ColorRequestWithBody(req *http.Request)
- func ColorResponse(res *http.Response)
- func ColorResponseWithBody(res *http.Response)
- func CurlRequest(req *http.Request)
- func CurlRequestWithBody(req *http.Request)
- func CurlResponse(res *http.Response)
- func CurlResponseWithBody(res *http.Response)
- type Render
Constants ¶
This section is empty.
Variables ¶
var ( RequestWellKnownHeaders = []string{ "Host", "Date", "User-Agent", "Accept", "Connection", "Authorization", "Accept-Charset", "Accept-Encoding", "Accept-Language", "Cookie", "Content-Length", "Referer", "Upgrade", } ResponseWellKnownHeaders = []string{ "Server", "Date", "Last-Modified", "Connection", "Content-Type", "Content-Length", "Transfer-Encoding", "Status", "Cache-Control", "Set-Cookie", "Trailer", "Vary", } )
refer to https://en.wikipedia.org/wiki/List_of_HTTP_header_fields
Functions ¶
func ColorRequest ¶
ColorRequest is the print function for http request in colored style without body
func ColorRequestWithBody ¶
ColorRequestWithBody is the print function for http request in colored style with body
func ColorResponse ¶
ColorResponse is the print function for http response in colored style without body
func ColorResponseWithBody ¶
ColorResponseWithBody is the print function for http response in colored style with body
func CurlRequest ¶
CurlRequest is the print function for http response in curl style without body
func CurlRequestWithBody ¶
CurlRequestWithBody is the print function for http response in curl style with body content
func CurlResponse ¶
CurlResponse is the print function for http response in curl style without body
func CurlResponseWithBody ¶
CurlResponseWithBody is the print function for http response in curl style with body content