request

package
v0.0.0-...-5993682 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2020 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AUserAgents

func AUserAgents(isPc bool) (agent string)

func GetHeader

func GetHeader(uri string) http.Header

func GetHost

func GetHost(s string) string

func GetReferer

func GetReferer(uri string) (string, error)

func GetReq

func GetReq() *req.Req

func HttpAuthGET

func HttpAuthGET(account, password, uri string) (content string, err error)

func HttpAuthPost

func HttpAuthPost(account, password, uri string, v url.Values) (content string, err error)

func HttpGets

func HttpGets(urls []string) (resp []html)

func HttpPost

func HttpPost(uri string, params url.Values) (content string, err error)

func HttpReq

func HttpReq(method, account, password, uri string, body io.Reader) (content string, err error)

func IsUrlNeedReferer

func IsUrlNeedReferer(uri string) bool

func MobileUserAgents

func MobileUserAgents() []string

func PCUserAgents

func PCUserAgents() []string

func UrlRemoveHost

func UrlRemoveHost(url string) string

Types

type Response

type Response struct {
	StatusCode int
	Data       string
	Err        error
	Speed      float64
}

func DoReq

func DoReq(uri string, proxy string) (resp *Response)

func HttpGet

func HttpGet(uri string) (httpResponse *Response)

type Responses

type Responses []Response

func (Responses) Len

func (rs Responses) Len() int

func (Responses) Less

func (rs Responses) Less(i, j int) bool

func (Responses) Swap

func (rs Responses) Swap(i, j int)

Jump to

Keyboard shortcuts

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