In this tutorial we'll see how you can call Unary methods. We'll be using the RouteGuide example service that is part of the gRPC repository. Shown below is the *.proto definition of the service
As you can see above, GetFeature is a Unary method. It accepts a request of type Point and returns a type Feature. Before we can call this method, we'll need to first discover the service. For that, please have a look at the Getting Started. Once the service is discovered and the client is generated and compiled you'll see the following
- Service Panel (Left) : Shows the discovered methods.
- Request Panel (Middle) : Shows the selected method
- Response Panel (Right) : Shows the response of the method call
Select the GetFeature method . This will generate a request populated with default values. Modify the request by selecting any of the child nodes. Once, all the parameters are populated, click on the Run button ( )
Another way of editing the request is to use the JSON editor