2 ms·
> 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.cu
by abdusco 2y ago
> 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?
- ainar-g 2y agoIf I recall correctly, ProtoBuf has a reflection layer, and it's probably using that.
- BobbyJo 2y agoI 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/ https://grpc.io/blog/grpc-with-json/