How to store request data in separate file and pass to client.invoke() in gRPC unary service

Hi Team,

I have below JSON request which I want to pass as req in below

const req = {
    "data": "SGVsbG8gV29ybGQ=",
    "fileName": "Sanity_FS",
    "namespace": "fseth",
    "topic": "fsdata"
};
const response = client.invoke('grpc.fileService.FileService/readFile', **req**);

In this “data” field will be encoded in base64 & will have lengthy text spread across many lines
So I want to store this complete “req” in separate json file and pass that req in client.invoke()
How can I do this ?

Thanks

Hi @shailendrakumaromkar

This seems somewhat related to How to pass multiple base64 encode data from json file as req in gRPC unary service, does the response there help?

Cheers!