Test gRPC endpoint with gzip compression using curl

57 views
Skip to first unread message

Luigi Riefolo

unread,
Oct 28, 2017, 7:52:05 AM10/28/17
to grpc.io
Hi,

I have a gRPC gateway that uses gzip compression.
Is there a way to test the gateway's endpoints using curl?

The enpoint being tested accepts GET requests and I've tried running:
curl -H "Content-Encoding: gzip" local host:8080/v1/alfa/get

but I get a "grpc: the client connection is closing", "code": 9.
Code 9 is FailedPrecondition.

Thanks for the help.

Dheeraj Bhadani

unread,
Oct 28, 2017, 8:01:59 AM10/28/17
to Luigi Riefolo, grpc.io
Hi Luigi,

I have tested endpoint using https://github.com/RussellLuo/grpc-pytools
However I have not used gzip myself. 

Cheers,
Dheeraj



--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscribe@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/dd3b5708-5217-45b2-9e31-d45b66283bed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Luigi Riefolo

unread,
Oct 28, 2017, 8:58:42 AM10/28/17
to grpc.io
Hi Dheeraj,

Thanks for the info.

I've fixed the problem. My server code was missing the ServerOptions "RPCCompressor" and "RPCDecompressor".

Thanks!

Reply all
Reply to author
Forward
0 new messages