From the course: gRPC in Python

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Using grpcurl to call your server

Using grpcurl to call your server

From the course: gRPC in Python

Using grpcurl to call your server

- [Instructor] Now that we have reflections, we can use grpcurl to call the server. To do that, we're going to create a json file, with the equivalent data that is in the protocol bar for definition. So, we have the car ID, driver ID, passenger IDs. The type is pool, location somewhere in London, and the time. And now, we can go and start our server. So, start with our de-bugging. And now, we'll go to the terminal, and G-R-P-C-U-R-L. And again, plain text, because we're not using HTPS. We're going to say dash D for data, and the @ sign, meaning read it from the standard output. We say the server is at local host, eight, eight, eight, eight. And we want to call the rides.start method and get the data from the request.json. And we get back an ID. If we look at our server, we see that it logged the incoming request, with the Bond as the driver, the passenger IDs, the type, and the time.

Contents