You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/03/08 10:10:50 UTC
[GitHub] [apisix] bisakhmondal edited a comment on issue #3874: bug: [grpc transcoding] Can not convert protobuf message's sub message from json input.
bisakhmondal edited a comment on issue #3874:
URL: https://github.com/apache/apisix/issues/3874#issuecomment-1061610429
Hi @keenbo, we are sorry you had to wait this long on this issue. Actually, we did a lot of refactoring in grpc transcode plugin lately. Could you please report if you are still facing the issue?
I tried to reproduce the same, it works fine as expected.
Snippet of my server side code for the same proto you shared
```go
func (s *server) SayHello(ctx context.Context, in *pb.HelloRequest) (*pb.HelloReply, error) {
return &pb.HelloReply{
Message: in.Name,
RspInfo: in.ReqInfo,
}, nil
}
```
Here's the request to the apisix
```shell
🔥➜ ~ curl -X POST -H "Content-Type:application/json" -H "te:trailers" -i http://127.0.0.1:9080/grpctest2 \
-d '{"name":"jack2","req_info":{"id":"id-001","msg":"it should work"}}'
HTTP/1.1 200 OK
Date: Tue, 08 Mar 2022 10:07:56 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
Server: APISIX/2.12.0
Trailer: grpc-status
Trailer: grpc-message
{"message":"jack2","rsp_info":{"id":"id-001","msg":"it should work"}}grpc-status: 0
grpc-message:
```
Thanks!
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org