httptoolkit icon indicating copy to clipboard operation
httptoolkit copied to clipboard

gRPC decoding

Open pimterry opened this issue 5 years ago • 6 comments

HTTP Toolkit could automatically detect & decode gRPC/gRPC-web.


Does this affect you too? Click below and add a :+1: to vote for this and help decide where HTTP Toolkit goes next, or go vote on the other most popular ideas so far.

pimterry avatar Sep 30 '19 17:09 pimterry

Should we expect grpc support?

fleytman avatar Jul 04 '22 19:07 fleytman

Eventually, absolutely! That said, it's currently number 8 on the open most-voted issues list, which is high but not top, so it's not being actively worked on today.

For reference, I think the first steps are probably:

  • A formatter in the UI for protobuf, which can work without .proto files (like protoc --decode_raw).
  • Adding application/grpc+proto to the supported content types, so that it uses that formatter, making it possible to read the body messages.
  • Improving how request & response streams are tracked, so that the bodies of streaming long-running requests are exposed early (right now we only show the body once it's finished, which I believe is problematic for quite a few gRPC use cases).

That alone would immediately make gRPC much more usable! There's much more we could do though, like rules to match certain requests, deeper UI integration to show the gRPC calls most explicitly, support to more easily edit bodies during breakpoints, and support for .proto files for more detailed & accurate content decoding. That bit depends on what you're looking for.

Right now, the most useful thing you can do to help with this is to share more information about your needs:

  • What's your use case?
  • which gRPC clients are you interested in? E.g. CLI clients, requests between Java services, mobile clients, etc.
  • What features are most important to you? Do you just want to see the data, or modify it in-flight? What data do you want to see?

Alternatively, if you're really interested in gRPC support, you'd be very welcome to work on some of the steps about and open a PR. Remember that HTTP Toolkit Pro is totally free for all open-source contributors :smile:

pimterry avatar Jul 05 '22 07:07 pimterry

Thank you for your reply. I'm testing mobile application which uses grpc-web. I'd like see and mock requests and responses.

fleytman avatar Jul 05 '22 11:07 fleytman

Ok, thanks, that makes sense. I think there's some promising options here for grpc-web at least, which should be easier than grpc in general (just body formatting alone would work easily and be a big improvement, for example). I'll keep an eye on this and see what I can do. In the meantime, open-source contributions here are very welcome!

pimterry avatar Jul 05 '22 15:07 pimterry

I've incidentally just run into gRPC Server Reflection - when we get to this, it'll be worth looking into that in more depth, since in theory it would allow us to pull the service's protobuf specification on-demand, which would let us provide much more accurate decoding and debugging tools very easily.

pimterry avatar Jul 08 '22 12:07 pimterry

See #80

konsumer avatar Apr 29 '23 02:04 konsumer