func (o *Operation) Unregister(rw http.ResponseWriter, req *http.Request) {
	rest.Execute(o.command.Unregister, rw, req.Body)
}
Unregister swagger:route DELETE /mediator/unregister mediator unregisterRouter

Unregisters the agent with the router.

Responses:
default: genericError
200: unregisterRouteRes
package mediator
import (
	"fmt"
	"net/http"
	"github.com/hyperledger/aries-framework-go/pkg/controller/command/mediator"
	"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/kms"
)
const (
	RouteOperationID   = "/mediator"
	RegisterPath       = RouteOperationID + "/register"
	UnregisterPath     = RouteOperationID + "/unregister"
	GetConnectionsPath = RouteOperationID + "/connections"
	ReconnectPath      = RouteOperationID + "/reconnect"
	StatusPath         = RouteOperationID + "/status"
	BatchPickupPath    = RouteOperationID + "/batchpickup"
	ReconnectAllPath   = RouteOperationID + "/reconnect-all"
)
type provider interface {
	Service(id string) (interface{}, error)
	KMS() kms.KeyManager
	ServiceEndpoint() string
	KeyType() kms.KeyType
	KeyAgreementType() kms.KeyType
	MediaTypeProfiles() []string
}
type Operation struct {
	handlers []rest.Handler
	command  *mediator.Command
}
func New(ctx provider, autoAccept bool) (*Operation, error) {
	routeCmd, err := mediator.New(ctx, autoAccept)
	if err != nil {
		return nil, fmt.Errorf("create route command : %w", err)
	}
	o := &Operation{command: routeCmd}
	o.registerHandler()
	return o, nil
}
func (o *Operation) GetRESTHandlers() []rest.Handler {
	return o.handlers
}
func (o *Operation) registerHandler() {
	o.handlers = []rest.Handler{
		cmdutil.NewHTTPHandler(RegisterPath, http.MethodPost, o.Register),
		cmdutil.NewHTTPHandler(UnregisterPath, http.MethodDelete, o.Unregister),
		cmdutil.NewHTTPHandler(GetConnectionsPath, http.MethodGet, o.Connections),
		cmdutil.NewHTTPHandler(ReconnectPath, http.MethodPost, o.Reconnect),
		cmdutil.NewHTTPHandler(StatusPath, http.MethodPost, o.Status),
		cmdutil.NewHTTPHandler(BatchPickupPath, http.MethodPost, o.BatchPickup),
		cmdutil.NewHTTPHandler(ReconnectAllPath, http.MethodGet, o.ReconnectAll),
	}
}
func (o *Operation) Register(rw http.ResponseWriter, req *http.Request) {
	rest.Execute(o.command.Register, rw, req.Body)
}