func (o *Operation) Send(rw http.ResponseWriter, req *http.Request) {
	rest.Execute(o.command.Send, rw, req.Body)
}
Send swagger:route POST /message/send message sendNewMessage

sends new message to destination provided

Responses:
default: genericError
200: sendMessageResponse
package messaging
import (
	"fmt"
	"net/http"
	"github.com/hyperledger/aries-framework-go/pkg/controller/command"
	"github.com/hyperledger/aries-framework-go/pkg/controller/command/messaging"
	"github.com/hyperledger/aries-framework-go/pkg/controller/internal/cmdutil"
	"github.com/hyperledger/aries-framework-go/pkg/controller/rest"
	"github.com/hyperledger/aries-framework-go/pkg/didcomm/common/service"
	"github.com/hyperledger/aries-framework-go/pkg/framework/aries/api/vdr"
	"github.com/hyperledger/aries-framework-go/pkg/kms"
	"github.com/hyperledger/aries-framework-go/spi/storage"
)
const (
	httpOverDIDComm                = "/http-over-didcomm"
	RegisterHTTPOverDIDCommService = httpOverDIDComm + "/register"
	MsgServiceOperationID = "/message"
	RegisterMsgService    = MsgServiceOperationID + "/register-service"
	UnregisterMsgService  = MsgServiceOperationID + "/unregister-service"
	MsgServiceList        = MsgServiceOperationID + "/services"
	SendNewMsg            = MsgServiceOperationID + "/send"
	SendReplyMsg          = MsgServiceOperationID + "/reply"
)
type provider interface {
	VDRegistry() vdr.Registry
	Messenger() service.Messenger
	ProtocolStateStorageProvider() storage.Provider
	StorageProvider() storage.Provider
	KMS() kms.KeyManager
}
type Operation struct {
	command  *messaging.Command
	handlers []rest.Handler
}
func New(ctx provider, registrar command.MessageHandler, notifier command.Notifier) (*Operation, error) {
	msgcmd, err := messaging.New(ctx, registrar, notifier)
	if err != nil {
		return nil, fmt.Errorf("failed to create messaging controller command: %w", err)
	}
	o := &Operation{command: msgcmd}
	o.registerHandler()
	return o, nil
}
func (o *Operation) GetRESTHandlers() []rest.Handler {
	return o.handlers
}
func (o *Operation) registerHandler() {
	o.handlers = []rest.Handler{
		cmdutil.NewHTTPHandler(RegisterMsgService, http.MethodPost, o.RegisterService),
		cmdutil.NewHTTPHandler(UnregisterMsgService, http.MethodPost, o.UnregisterService),
		cmdutil.NewHTTPHandler(MsgServiceList, http.MethodGet, o.Services),
		cmdutil.NewHTTPHandler(SendNewMsg, http.MethodPost, o.Send),
		cmdutil.NewHTTPHandler(SendReplyMsg, http.MethodPost, o.Reply),
		cmdutil.NewHTTPHandler(RegisterHTTPOverDIDCommService, http.MethodPost, o.RegisterHTTPService),
	}
}
func (o *Operation) RegisterService(rw http.ResponseWriter, req *http.Request) {
	rest.Execute(o.command.RegisterService, rw, req.Body)
}
func (o *Operation) UnregisterService(rw http.ResponseWriter, req *http.Request) {
	rest.Execute(o.command.UnregisterService, rw, req.Body)
}
func (o *Operation) Services(rw http.ResponseWriter, req *http.Request) {
	rest.Execute(o.command.Services, rw, req.Body)
}