util

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HttpGet

func HttpGet(path string) ([]byte, error)

HttpGet GET请求

func HttpPost

func HttpPost(path string, body interface{}) ([]byte, error)

HttpPost POST请求

func HttpPostFile

func HttpPostFile(path string, options FileOptions) ([]byte, error)

HttpPostFile POST上传文件

func HttpPostOriginFile added in v0.0.28

func HttpPostOriginFile(path, fileName string, size int, body []byte) ([]byte, error)

HttpPostOriginFile POST上传文件

Types

type FileOptions

type FileOptions struct {
	//文件名
	FileName string `json:"fileName"` // 文件名
	//文件大小
	FileSize int64 `json:"fileSize"` // 文件大小
	//文件内容
	File io.Reader // 文件内容
}

FileOptions 文件上传参数

Jump to

Keyboard shortcuts

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