Can you please tell me how to add REST API support using google.api.http?syntax = "proto3";
import "google/api/annotations.proto";
service TestService {
rpc Method(MethodRequest) returns (MethodResponse) {
option (google.api.http) = {
post: "/api/v1/test"
body: "*"
};
}
}
What should be added here?
server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))
stt_pb2_grpc.add_TestServiceServicer_to_server(
TestService(), server
)
address = f"{host}:{port}"
server.add_insecure_port(address)
server.start()
server.wait_for_termination()