Hacker News new | past | comments | ask | show | jobs | submit login

> make requests even if you don't have the .proto around

Like this?

    > grpcurl -d '{"id": 1234, "tags": ["foo","bar"]}' \
        grpc.server.com:443 my.custom.server.Service/Method
How is that even possible? How could grpcurl know how to translate your request to binary?



If I recall correctly, ProtoBuf has a reflection layer, and it's probably using that.


I could be wrong, but it is probably using json encoding for the object body, and implementing the transport for grpc instead of http. Proto objects support json encode/decode by default in all the implementations I've seen.

https://grpc.io/blog/grpc-with-json/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: