How to connect to deployed grpc-server by ip address and host
I want to connect to deployed grpc server by given ipaddress and host like 192.168.0.1:50032 i tried many stuff but as i checked grpc recommendation to have grpc client but i want to try how to post via postman or any by grpc interfaces server. Any suggestion?
conn, err := grpc.Dial("192.168.0.1:50032")
if err != nil {
...
}
Here's a basic tutorial you should follow
Basically you're not able to post GRPC request via Postman, because GRPC messages are binary (protobuf-serialized), while Postman is designed to work only with plain HTTP requests. You'll have to deploy some kind of proxy in front of your service in order to use Postman.
From my point of view, it's much easier just to write your client that fits your needs. The greatest part of job is already done by protoc-gen-grpc
, because it generates client API, and you need just to build request and send it.