Closed
Description
🐛 Bug Report
use runtime.NewServeMux
with runtime.WithForwardResponseOption
compile throw:
cannot use myFilter (type func(context.Context, http.ResponseWriter, protoreflect.ProtoMessage) error) as type func(context.Context, http.ResponseWriter, protoiface.MessageV1) error in argument to "github.com/grpc-ecosystem/grpc-gateway/runtime".WithForwardResponseOption
source code:
func myFilter(ctx context.Context, w http.ResponseWriter, resp proto.Message) error {
return nil
}
gwMux := runtime.NewServeMux(
// runtime.WithIncomingHeaderMatcher(func(key string) (string, bool) {
// return key, true
// }),
// runtime.WithOutgoingHeaderMatcher(func(key string) (string, bool) {
// return key, true
// }),
runtime.WithForwardResponseOption(myFilter),
)
Environment
- github.com/grpc-ecosystem/grpc-gateway v1.14.7
- go version go1.14.7 darwin/amd64
Metadata
Metadata
Assignees
Labels
No labels