mp_http

package
v0.0.0-...-5b025be Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComRet

func ComRet(code int, msg string, ret map[string]interface{}) def.ComRt

ComRet 通用返回

func Get

func Get(uri string, m map[string]interface{}) (string, error)

Get Get请求(20秒超时)

func JsonOk

func JsonOk(c *gin.Context, msg string, ret map[string]interface{}) bool

JsonOk gin版本返回

func JsonWrong

func JsonWrong(c *gin.Context, code int, msg string, ret map[string]interface{}) bool

JsonWrong gin版本返回

func OkRet

func OkRet(msg string, ret map[string]interface{}) def.ComRt

OkRet 正确返回

func Post

func Post(uri string, m interface{}) (string, error)

Post Post请求(20秒超时)

func PostTimeout

func PostTimeout(uri string, m interface{}, timeout time.Duration) (string, error)

PostTimeout POST请求带超时设置

func WrongRet

func WrongRet(code int, msg string, ret map[string]interface{}) def.ComRt

WrongRet 错误返回

Types

This section is empty.

Jump to

Keyboard shortcuts

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