Help us shape the future of Go! Take the 2026 Go Developer Survey

network

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Response

type Response struct {
	Status  int                    `json:"status"`
	Body    string                 `json:"body"`
	Data    interface{}            `json:"data"`
	Headers map[string]interface{} `json:"headers"`
}

Response 请求响应结果

func RequestGet

func RequestGet(url string, params map[string]interface{}, headers map[string]string) Response

RequestGet 发送GET请求

func RequestPost

func RequestPost(url string, data interface{}, headers map[string]string) Response

RequestPost 发送POST请求

func RequestPostJSON

func RequestPostJSON(url string, data interface{}, headers map[string]string) Response

RequestPostJSON 发送POST请求

func RequestPut

func RequestPut(url string, data interface{}, headers map[string]string) Response

RequestPut 发送PUT请求

func RequestPutJSON

func RequestPutJSON(url string, data interface{}, headers map[string]string) Response

RequestPutJSON 发送PUT请求

func RequestSend

func RequestSend(method string, url string, params map[string]interface{}, data interface{}, headers map[string]string) Response

RequestSend 发送Request请求

Jump to

Keyboard shortcuts

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