tokers commented on code in PR #8364:
URL: https://github.com/apache/apisix/pull/8364#discussion_r1041691092


##########
t/grpc_server_example/main.go:
##########
@@ -217,6 +223,21 @@ func (s *server) Run(ctx context.Context, in *pb.Request) 
(*pb.Response, error)
        return &pb.Response{Body: in.User.Name + " " + in.Body}, nil
 }
 
+func gRPCAndHTTPFunc(grpcServer *grpc.Server) http.Handler {
+       return h2c.NewHandler(http.HandlerFunc(func(w http.ResponseWriter, r 
*http.Request) {
+               mux := http.NewServeMux()
+               mux.HandleFunc("/", func(w http.ResponseWriter, r 
*http.Request) {
+                       w.Write([]byte("hello http"))
+               })
+
+               if r.ProtoMajor == 2 && 
strings.Contains(r.Header.Get("Content-Type"), "application/grpc") {

Review Comment:
   Sorry, I sent a wrong repo, please ignore it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to