func Execute(exec command.Exec, rw http.ResponseWriter, req io.Reader) {
	rw.Header().Set("Content-Type", "application/json")
	err := exec(rw, req)
	if err != nil {
		SendError(rw, err)
	}
}
Execute executes given command with args provided and writes error to
response writer.
package rest
import (
	"encoding/json"
	"io"
	"net/http"
	"github.com/hyperledger/aries-framework-go/pkg/common/log"
	"github.com/hyperledger/aries-framework-go/pkg/controller/command"
)
var logger = log.New("aries-framework/rest")
type Handler interface {
	Path() string
	Method() string
	Handle() http.HandlerFunc
}