part

package
v0.5.29 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: MIT Imports: 16 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ConnectTimeoutErr = errors.New("ConnectTimeoutErr")
	ReadTimeoutErr    = errors.New("ReadTimeoutErr")
)

Functions

func Cookies_List_2_Map

func Cookies_List_2_Map(Cookies []*http.Cookie) (o map[string]string)

func Cookies_String_2_Map

func Cookies_String_2_Map(Cookies string) (o map[string]string)

func IsCancel

func IsCancel(e error) bool

func IsTimeout

func IsTimeout(e error) bool

func Map_2_Cookies_String

func Map_2_Cookies_String(Cookies map[string]string) (o string)

Types

type Req

type Req struct {
	Respon   []byte
	Response *http.Response
	UsedTime time.Duration

	sync.Mutex
	// contains filtered or unexported fields
}

func New

func New() *Req

func (*Req) Cancel

func (t *Req) Cancel()

func (*Req) Close

func (t *Req) Close()

func (*Req) Id

func (t *Req) Id() uintptr

func (*Req) Reqf

func (this *Req) Reqf(val Rval) error

func (*Req) Reqf_1

func (this *Req) Reqf_1(val Rval) (err error)

type Rval

type Rval struct {
	Url              string
	PostStr          string
	Timeout          int
	ReadTimeout      int
	ConnectTimeout   int
	Proxy            string
	Retry            int
	SleepTime        int
	JustResponseCode bool

	SaveToPath       string
	SaveToChan       chan []byte
	SaveToPipeWriter *io.PipeWriter

	Header map[string]string
}

Jump to

Keyboard shortcuts

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