curl

package
v0.0.0-...-593c55d Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2019 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"
)

Variables

View Source
var (
	Err401           = errors.New("用户登录信息失效")
	ErrTimeOutHeader = errors.New("请求目标网站超时(header)")
)

Functions

func CHeckTimeOutErr

func CHeckTimeOutErr(err error) error

Types

type CapLoginProcessor

type CapLoginProcessor interface {
	CaptchaUrl() string
	Method() string
	LoginUrl() string
}

type RequestFunc

type RequestFunc = func(rp *grequests.Response) (err error)

type RequestObj

type RequestObj struct {
	URL string
	Opt *grequests.RequestOptions
}

func NewCurl

func NewCurl(urlStr string) (ro *RequestObj, err error)

func (*RequestObj) Get

func (r *RequestObj) Get(fn RequestFunc) error

func (*RequestObj) GetCookie

func (r *RequestObj) GetCookie() error

func (*RequestObj) Post

func (r *RequestObj) Post(fn RequestFunc) error

Jump to

Keyboard shortcuts

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