http

package
v0.0.0-...-1e877d2 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractBody

func ExtractBody(req http.Request) (string, error)

ExtractBody 解析请求body并回写

func ParseAndValidateBody

func ParseAndValidateBody(req *http.Request, target interface{}) error

ParseAndValidateBody 解析并校验http.Request.Body

Types

type Response

type Response struct {
	HTTPCode int
	Response string
}

func Send

func Send(ctx context.Context, method, url string, header map[string]string, body io.Reader, timeout time.Duration) (ret Response, err error)

Send 发送请求

Jump to

Keyboard shortcuts

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