Skip to content

goctx/http-wechat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

http-wechat

微信公众平台被动回复中间件,基于标准库http开发。

Get Started

package main

import (
	hw "github.com/goctx/http-wechat"
)

func main() {
	wechat := hw.New("token", "appid", "encodingAESKey", true)
	wechat.Run(func(req *hw.Request) interface{} {
		if req.MsgType == hw.MsgTypeEvent && req.Event == hw.EventTypeSubscribe {
			return &hw.TextResponse{
				Content: "谢谢关注",
			}
		}
		return "success"
	})
}

TODO

  • 加密模式支持

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages