Grpc mock server url use in local development (asap)

Hi i have a GRPC client written in Golang, since postman provides a url in mock server how can i use it.

func getQuotationGRPCClient() (*grpc.ClientConn, quotationServices.QuotationServiceClient) {
	grpcConnectionInfo := serverutilsgrpc.GrpcConnectionInfo{
			ListenAddress: "g-kw7p55yp8np1m404n1k4639krn2vyd.srv.pstmn.io",
			DialOptions:   []grpc.DialOption{grpc.WithInsecure()},
		}
       	conn := serverutilsgrpc.GetGrpcConnection(grpcConnectionInfo, logglyLogger.GetLogrusEntry())
	client := quotationServices.NewQuotationServiceClient(conn)
	return conn, client
}

Using this url gives error as “connection error: desc = "transport: Error while dialing dial tcp: address g-kw7p55yp8np1m404n1k4639krn2vyd.srv.pstmn.io: missing port in address"”

Please help asap!!!

@punit You need to establish a TLS connection. Also, from the error message, use port 443.

Hi @udit, I am very new to grpc. Just wondering how I can establish a TLS connection to the postman mock servers? Is it using some particular certificate that I can use in my local development?

@supply-explorer-1412 You can enable TLS by toggling the lock icon, refer:

Screenshot 2023-03-30 at 4.06.56 PM

Certificates are needed only if your server has mTLS setup.

Thanks for you reply. I guess I didn’t make this clear. What I wanted to achieve was to use the grpc mock server in my local python development (i.e. my code will start up as a grpc client to call the grpc mock server). At this stage, I am not able to connect to the grpc mock server.

I have some updates. So I managed to connect to the Postman mock grpc server with grpcurl. But received the following error when I try it with my python client:
Cannot check peer: missing selected ALPN property

I am using python 3.8 and grpc 1.53.