curl

package
v0.0.0-...-42cc2d4 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: Apache-2.0, Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HttpBuildQuery

func HttpBuildQuery(params map[string]string) string

HttpBuildQuery 格式化url会按照字母进行排序

Types

type Request

type Request struct {
	Url         string
	Method      string
	Headers     map[string]string
	BodyData    interface{}
	ReqTimeOut  time.Duration
	RespTimeOut time.Duration
}

type Response

type Response struct {
	Status     string
	StatusCode int
	Header     map[string]string
	Body       []byte
}

func Get

func Get(req Request) (resp Response, err error)

Get HTTP GET 请求

func Post

func Post(req Request) (resp Response, err error)

POST HTTP POST 请求

Jump to

Keyboard shortcuts

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