From 5c95e4865671c8c52551b3a7a86f9b8d0894dd52 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 --- grpc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grpc.go b/grpc.go index 7f38901..6f5c378 100644 --- a/grpc.go +++ b/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) }()