grequest

package
v1.0.97 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: MulanPSL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RequestGetOptions

type RequestGetOptions struct {
	URL     string            `json:"url"`
	Params  map[string]string `json:"params"`
	Headers map[string]string `json:"headers"`
}

type RequestPostOptions

type RequestPostOptions struct {
	URL     string            `json:"url"`
	Data    map[string]any    `json:"data"`
	Headers map[string]string `json:"headers"`
}

RequestPostOptions 结构体用于封装POST请求的选项

type Response

type Response struct {
	Code    int    `json:"code"`
	Msg     string `json:"msg"`
	Content any    `json:"content"`
}

func Get

func Get(options RequestGetOptions) (Response, error)

func Post

func Post(options RequestPostOptions) (Response, error)

RequestPost 函数用于发送POST请求

Jump to

Keyboard shortcuts

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