I have the below grpc request which is working fine with Postman:-
URL :- 10.91.151.107:30105
Payload :- {
"headend": { "v4": 173768306 },
"tailend": { "v4": 173768309 },
"dataplane": "DATAPLANE_MPLS",
"o_metric": "METRIC_TYPE_IGP",
"constraints": { "unprotected_segments": true ,"max_segments":10 ,"return_path_max_segments":10 },
"corouted_return_path": true
}
There is no proto buf imported for the above request. I can using it is using the server reflection to get "Unary" as "StatelessCalc/SinglePath"
How can I invoke the same request with python from pycharm?
from grpc_requests import Client
client = Client.get_by_endpoint("localhost:50051")
assert client.service_names == ["helloworld.Greeter"]
request_data = {"name": "sinsky"}
say_hello_response = client.request("helloworld.Greeter", "SayHello", request_data)
assert say_hello_response == {"message":"Hello sinsky!"}
