httpx

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadToBytes

func DownloadToBytes(url string, params map[string]string) ([]byte, error)

DownloadToBytes 下载文件为byte数组

func DownloadToFile

func DownloadToFile(url, localfile string, params map[string]string) error

DownloadToFile 下载文件

func NewClient

func NewClient(opts ...Option) *resty.Client

NewClient 创建一个http客户端

Types

type Option

type Option func(cli *resty.Client)

func WithRetryCount

func WithRetryCount(cnt int) Option

WithRetryCount 重试次数

func WithSkipTLS

func WithSkipTLS() Option

WithSkipTLS 跳过证书认证

func WithTimeout

func WithTimeout(sec int) Option

WithTimeout 超时时间

Jump to

Keyboard shortcuts

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