restclient

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Client *resty.Client

Functions

func GetIP

func GetIP(r *http.Request) (string, error)

GetIP returns request real ip.

func GetRequest

func GetRequest[T any](ugn *utils.UserGroupNamespace, fullApi string, query map[string]string) restjson.Response[T]

GetRequest 发起rest get请求

func InitHttpClient

func InitHttpClient()

func PostRequest

func PostRequest[T any](ugn *utils.UserGroupNamespace, fullApi string, query map[string]string, body any) restjson.Response[T]

PostRequest 发起rest post请求

Types

This section is empty.

Jump to

Keyboard shortcuts

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