Open gianlucaparadise opened 1 year ago
It would be nice to have the possibility to generate a gRPCurl command starting from an httpyac request. This feature should be similar to the generate shell - curl feature available for http requests.
The easiest structure of a grpcurl command is:
grpcurl \ -H 'my-metadata: my-value' \ -H 'my-other-metadata: my-other-value' \ -d '{ "my_request_field": "my_request_value" }' \ -plaintext {{host}} {{service}}/{{method}}
plaintext is needed for servers without TLS.
plaintext
This:
GRPC grpcb.in:9000/grpcbin.GRPCBin/DummyUnary { "fString": "my value" }
Generates:
grpcurl \ -d '{ "fString": "my value" }' \ -plaintext grpcb.in:9000 grpcbin.GRPCBin/DummyUnary
And this:
GRPC grpcb.in:9000/grpcbin.GRPCBin/HeadersUnary my-metadata: my-value
grpcurl \ -H 'my-metadata: my-value' \ -plaintext grpcb.in:9000 grpcbin.GRPCBin/HeadersUnary
It would be nice to have the possibility to generate a gRPCurl command starting from an httpyac request. This feature should be similar to the generate shell - curl feature available for http requests.
The easiest structure of a grpcurl command is:
plaintext
is needed for servers without TLS.Examples
This:
Generates:
And this:
Generates: