Get know about gRPC Gateway over there: gRPC Gateway
Install some tools related gRPC Gateway
Pull this example & run
# Ensure export GO111MODULE=on
go mod vendor
If you want to update protobuf definition
./scripts/pb-gen.sh
Start server gRPC first: server/main.go Then start server gRPC Gateway main.go
# Call a HTTP Request to Gateway & check result
curl -X GET \
http://127.0.0.1:8080/get \
-H 'Content-Type: application/json' \
-d '{
"value": "ekuuuu"
}'
# Call a HTTP Request to Gateway to get swagger content
curl -X GET \
http://127.0.0.1:8080/swagger/template.swagger.json