request

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: MIT Imports: 16 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fetcher

type Fetcher struct {
	Url        string
	PostBody   map[string]interface{}
	Timeout    time.Duration
	RetryTimes int
	Headers    map[string]string
	Proxy      string
	NoRedirect bool
	// contains filtered or unexported fields
}

func NewFetcher

func NewFetcher() *Fetcher

func (*Fetcher) DownloadAndDecompress added in v0.2.3

func (that *Fetcher) DownloadAndDecompress(localPath, dstDir string, force ...bool) error

func (*Fetcher) Get

func (that *Fetcher) Get() (r *resty.Response)

func (*Fetcher) GetAndSaveFile

func (that *Fetcher) GetAndSaveFile(localPath string, force ...bool) (size int64)

func (*Fetcher) GetFile

func (that *Fetcher) GetFile(localPath string, force ...bool) (size int64)

func (*Fetcher) GetString added in v0.3.4

func (that *Fetcher) GetString() (result string, statusCode int)

func (*Fetcher) Post

func (that *Fetcher) Post() (r *resty.Response)

func (*Fetcher) RemoveProxy

func (that *Fetcher) RemoveProxy()

func (*Fetcher) SetCheckSum added in v0.2.3

func (that *Fetcher) SetCheckSum(checkSum, checkSumType string)

func (*Fetcher) SetProxyEnvName

func (that *Fetcher) SetProxyEnvName(name string)

func (*Fetcher) SetThreadNum added in v0.1.5

func (that *Fetcher) SetThreadNum(num int)

func (*Fetcher) SetUrl added in v0.1.5

func (that *Fetcher) SetUrl(url string)

Jump to

Keyboard shortcuts

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