request

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 18 Imported by: 13

Documentation

Index

Constants

View Source
const (
	WaitBarCompleteEnv string = "REQUEST_WAIT_BAR_COMPLETE"
)

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) Delete

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

func (*Fetcher) DownloadAndDecompress

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

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

func (*Fetcher) Patch

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

func (*Fetcher) Post

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

func (*Fetcher) Put

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

func (*Fetcher) RemoveProxy

func (that *Fetcher) RemoveProxy()

func (*Fetcher) SetCheckSum

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

func (*Fetcher) SetProgramOpts

func (that *Fetcher) SetProgramOpts(opts ...tea.ProgramOption)

func (*Fetcher) SetProxyEnvName

func (that *Fetcher) SetProxyEnvName(name string)

func (*Fetcher) SetThreadNum

func (that *Fetcher) SetThreadNum(num int)

func (*Fetcher) SetUrl

func (that *Fetcher) SetUrl(url string)

Jump to

Keyboard shortcuts

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