Export/Import request to/from grpcurl
devkanro opened this issue · 6 comments
Sometimes I need to share my request settings/metadata with my team.
I will export a curl command for other people, they can import the curl command in PostMan or other something in HTTP/Json case.
Maybe we can support export and import request to grpcurl?
grpcurl -d '{"id": 1234, "tags": ["foo","bar"]}' \
grpc.server.com:443 my.custom.server.Service/Method
Thanks for the suggestion; will look into this.
I and my teammate(@iou90) have forked the repo and working on this, we will create a pull request later.
Hi, grpcurl dosn't correct work, if use protofiles on server without reflection. If run from wombat, I get message
Error invoking method ".../Create": failed to query for service descriptor "...Service": server does not support the reflection API
If add -proto and -import-path with paths to grpcurl from wombat, I get correct response
@devkanro do you can fix it?
@fleytman This is a known limit, see the PR #51, not sure if this project is still being maintained.
The reason why I didn't support exporting the proto root directory at the time was that I considered the usage scenario of our teamwork. In most cases, my colleague got the exported grpcurl and directly imported his wombat.
I sent grpcurl to another colleague, but on his computer there's a good chance our proto root is in a different location, so exporting the proto root is just a distraction for us.
Thanks for answer, my case if i copy/paste in terminal i get error. And if i get curl with wrong path, my colleague, he can fix path and not need known, which option he need add to grpcurl. And you can clone repo in ~/myrepo. I think, if it add how option, you can use with collegue:
- You share grpcurl without path
- He copy from wombat with path and easy execute command
not sure if this project is still being maintained.
What you use how alternative?
@fleytman
I am using built in gRPC client in my IDEA protobuf plugin.
The official protobuf plugin and gRPC plugin support this feature too, but it can't import protos in library with Java project.
And you can easy to generate request with line marker in proto.
But it can't export as grpcurl, it using a DSL language designed by jetbrains.