Documentation ¶
Overview ¶
Package httputil is simple http decode request wrapper
Package httputil is simple http GET request wrapper ¶
Package httputil is simple http POST request wrapper
Index ¶
- func DecodeHTMLBody(body io.Reader) (io.Reader, error)
- func GetBytes(u string, headers http.Header, timeout time.Duration, retryCount int) (c []byte, err error)
- func GetHostByURL(u string) (host string)
- func GetPage(url, ua string) (io.Reader, error)
- func PostPage(url, key string) (io.Reader, error)
- func SetInsecureSkipVerify(b bool)
- func SetUserAgent(ua string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeHTMLBody ¶
DecodeHTMLBody returns an decoding reader of the html Body for the specified `charset` If `charset` is empty, DecodeHTMLBody tries to guess the encoding from the content
func GetBytes ¶
func GetBytes(u string, headers http.Header, timeout time.Duration, retryCount int) (c []byte, err error)
GetBytes returns content as []byte
func SetInsecureSkipVerify ¶ added in v1.0.4
func SetInsecureSkipVerify(b bool)
func SetUserAgent ¶ added in v1.0.4
func SetUserAgent(ua string)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.