httpx

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Post            = "POST"
	Get             = "GET"
	Put             = "PUT"
	Delete          = "DELETE"
	PrefixHttp      = "http://"
	ContentTypeKey  = "Content-Type"
	ContentTypeJson = "application/json"
	ContentTypeGBK  = "application/javascript;charset=GBK"
)

Variables

This section is empty.

Functions

func DecodeBody

func DecodeBody(src string) (dst string)

转码

func DeleteHttp

func DeleteHttp(url string) (res []byte, err error)

func GetHttp

func GetHttp(url string) (result []byte, err error)

func MapToUrl

func MapToUrl(params map[string]interface{}) (s string)

map转为Url

func PostHttp

func PostHttp(url string, param interface{}) (result []byte, err error)

func PutHttp

func PutHttp(url string, param interface{}) (result []byte, err error)

func RequestHttp

func RequestHttp(method string, host string, header map[string]string, param interface{}) (result string, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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