htp

package
v1.0.21 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Ip      string        // Ip
	Port    uint          // 端口
	Timeout time.Duration // 超时
)

Functions

func Delete

func Delete(url string, headers map[string]string, r ...any) (*resty.Response, error)

删除

func Get

func Get(url string, headers map[string]string, r ...any) (*resty.Response, error)

获取

func GetFileUrl added in v1.0.6

func GetFileUrl(filePath string) string

获取文件地址

func GetFullUrl added in v1.0.6

func GetFullUrl(url string) string

获取完整地址

func Post

func Post(url string, headers map[string]string, data any, r ...any) (*resty.Response, error)

提交

func PostFile

func PostFile(url string, headers map[string]string, files map[string]string, r ...any) (*resty.Response, error)

提交文件

func PostForm

func PostForm(url string, headers map[string]string, data map[string]string, r ...any) (*resty.Response, error)

提交表单

func Put

func Put(url string, headers map[string]string, data any, r ...any) (*resty.Response, error)

提交

func SaveFile

func SaveFile(url string, headers map[string]string, file ...string) (*resty.Response, error)

保存文件

Types

This section is empty.

Jump to

Keyboard shortcuts

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