httputil

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2020 License: MIT Imports: 12 Imported by: 3

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeHTMLBody

func DecodeHTMLBody(body io.Reader) (io.Reader, error)

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 GetHostByURL

func GetHostByURL(u string) (host string)

GetHostByURL get host by url

func GetPage

func GetPage(url, ua string) (io.Reader, error)

GetPage get HTML page by url

func PostPage

func PostPage(url, key string) (io.Reader, error)

PostPage post to page

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL