net

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: MulanPSL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(_url string, header http.Header, params url.Values, timeout time.Duration) (*http.Response, error)

func GetJson added in v0.2.1

func GetJson(_url string, header http.Header, params url.Values, timeout time.Duration) (map[string]any, error)

func GetUrl

func GetUrl(_url string, params url.Values) (string, error)

func Post

func Post(_url string, header http.Header, params map[string]string, files map[string]string, timeout time.Duration) (*http.Response, error)

_url: 如果出现error:first path segment in URL cannot contain colon. 那么前面加上http:// files: key-FormName,value-FileName

func PostJson added in v0.2.1

func PostJson(_url string, header http.Header, params map[string]string, files map[string]string, timeout time.Duration) (map[string]any, error)

Types

type Value added in v0.2.1

type Value = kv.Map[string]

func GetValue added in v0.2.1

func GetValue(v Value, key string) (Value, error)

Jump to

Keyboard shortcuts

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