server

package
v2.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode added in v2.1.2

func Decode(contentType string, reader io.Reader, msg interface{}) error

func IsJSON added in v2.1.2

func IsJSON(contentType string) bool

func IsXML added in v2.1.2

func IsXML(contentType string) bool

Types

type MessageHandler added in v2.1.2

type MessageHandler func(mixMessage *message.MiniProgramMixMessage) *message.Reply

Server struct

type Server

type Server struct {
	*context.Context
	// contains filtered or unexported fields
}

Server struct

func NewServer

func NewServer(context *context.Context) *Server

func (*Server) ServeHTTP added in v2.1.2

func (srv *Server) ServeHTTP(request *http.Request, writer http.ResponseWriter)

ServeHTTP 小程序消息处理中间件 GET 验证消息的确来自微信服务器 POST 处理客服消息

func (*Server) SetMessageHandler

func (srv *Server) SetMessageHandler(messageHandler MessageHandler)

Jump to

Keyboard shortcuts

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