From 100cb9db6b844ec900919b19bfaf291d72e2aecc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E4=B8=89?= <32760011+three-zhang@users.noreply.github.com> Date: Sat, 27 Jul 2019 11:11:16 +0800 Subject: [PATCH] fix bug https://github.com/micro/micro/issues/293 Send request failed using micro Content-Type application/grpc+json --- client/grpc/grpc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/grpc/grpc.go b/client/grpc/grpc.go index 7f389012..6f5c3789 100644 --- a/client/grpc/grpc.go +++ b/client/grpc/grpc.go @@ -127,7 +127,7 @@ func (g *grpcClient) call(ctx context.Context, node *registry.Node, req client.R ch := make(chan error, 1) go func() { - err := cc.Invoke(ctx, methodToGRPC(req.Service(), req.Endpoint()), req.Body(), rsp, grpc.ForceCodec(cf)) + err := cc.Invoke(ctx, methodToGRPC(req.Service(), req.Endpoint()), req.Body(), rsp, grpc.CallContentSubtype(cf.Name())) ch <- microError(err) }()