util

package
v0.0.0-...-45be4db Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HttpGet

func HttpGet(url string) ([]byte, error)

HttpGet 用于发送HTTP GET请求

func HttpPost

func HttpPost(url string, data []byte) ([]byte, error)

HttpPost 发送HTTP POST请求

func HttpPostJSON

func HttpPostJSON(url string, obj interface{}) ([]byte, error)

HttpPostJSON 会先将obj转换为json,再发送HTTP POST请求

Types

type ErrInfo

type ErrInfo struct {
	ErrCode int    `json:"errcode"`
	ErrMsg  string `json:"errmsg"`
}

ErrInfo 是微信平台返回的通用错误信息定义 用于避免重复定义

func (*ErrInfo) IsSuccess

func (e *ErrInfo) IsSuccess() bool

Jump to

Keyboard shortcuts

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