Documentation
¶
Index ¶
- func FilterWithChunkEncoding(body []byte) (bodyTE []byte, residueB []byte)
- func FilterWithContentLength(contentLength int, body []byte) (bodyCL []byte, residueB []byte, difference int)
- func ParseRequest(reader *bufio.Reader) (httpHeader http.Header, bodyB []byte, err error)
- func ParseRequestWithoutPrint(reader *bufio.Reader) (request request.Request, err error)
- func ParseResponse(reqMethod string, url string, resp string) (response response.Response, err error)
- func ParseUrl(url string) (tls bool, addr string)
- func ReplaceSpecialCharacters(rawWithSpecial []byte) (strWithoutSpecial string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterWithChunkEncoding ¶
Parse the body according to chunk encoding
func FilterWithContentLength ¶
func FilterWithContentLength(contentLength int, body []byte) (bodyCL []byte, residueB []byte, difference int)
Parse the body according to Content-Length Header
func ParseRequest ¶
Parse a request to retrieve headers and body
func ParseRequestWithoutPrint ¶
Parse a request to retrieve headers and body but do not print any information
func ParseResponse ¶
func ParseResponse(reqMethod string, url string, resp string) (response response.Response, err error)
ParseResponse: parse an HTTP response to retrieve the status line, the header field and the body
func ReplaceSpecialCharacters ¶
ReplaceSpecialCharacters: replace special characters in a given string (bytes) to make them visible
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.