Use grpx-json-proxy out of the box.
4.6K
GRPC JSON is a proxy which allows HTTP API tools like Postman to interact with gRPC servers.
Configuration of the proxy and its dependencies is a three step process.
Register a JSON codec with the gRPC server. In Go, it can be automatically registered simple by adding the following import:
import _"github.com/jnewmano/grpc-json-proxy/codec"
If you're using gogo/protobuf as your protobuf backend, import the following:
import _"github.com/jnewmano/grpc-json-proxy/gogoprotobuf/codec"
go get -u github.com/jnewmano/grpc-json-proxy
grpc-json-proxy
Other way, you can simply use grpc-json-proxy docker image out of the box:
docker run -it -p 7001:7001 vincenthcui/grpc-json-proxy
Proxy Server: localhost 7001

Setup your Postman gRPC request with the following:
For example:

Inspired by Johan Brandhorst's grpc-json
If you use docker image to run grpc-json-proxy server, and want to access grpc via loopback address 127.0.0.1, you should pay attention to docker network accessibility.
host.docker.internal instead of 127.0.0.1 in Linux.docker.for.mac.host.internal instead of 127.0.0.1 in MacOS and with Docker for Mac 17.12 or above.See: https://docs.docker.com/docker-for-mac/networking/#use-cases-and-workarounds
Content type
Image
Digest
Size
25.6 MB
Last updated
about 7 years ago
docker pull vincenthcui/grpc-json-proxy