微信公众平台API封装
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
context
custom
gin
lang
material
menu
message
oauth
qrcode
template
.gitignore
LICENSE
README.md
cdata.go
client.go
client_test.go
crypter.go
error.go
error_test.go
gin-context.go
go.mod
go.sum
http.go

README.md

go-wechat

🎉微信Api请求基础SDK

Example 🌰

package wechat

import (
	"fmt"
	"testing"
)

func init() {
	AppID = "123"
	AppSecret = "abc"
}

func TestExecute(t *testing.T) {
	// 小程序登录
	url := "https://api.weixin.qq.com/sns/jscode2session"
	param := Parameter{
		"js_code":    "登录时获取的 code",
		"grant_type": "authorization_code",
	}
	json, err := Execute(url, param)
	if err != nil {
		t.Fatal(err)
	}
	fmt.Println(json)
}