I want to call Google Cloud APIs from Forge app by using @google-cloud/security-center library. But it is only working while using forge tunnel. The function is getting timed out when it is called from the deployed app.
Is the mentioned library supported in Forge?
What is the recommended way for calling Google APIs from Forge app?
Hi Benny,
I checked again and we are using await while making the async call. Below is the sample code snippet of how we are using the library. Still facing same issue.
Hi @SagarGujarati , currently the Forge Node runtime only supports network egress through either the inbuilt https module or global fetch (docs).
My assumption is that the @google-cloud/security-center library has it’s own network implementation which does not use https or global fetch. I would recommend having a close look at the library and seeing if there is a way for it to use either https, an https based client (e.g - node-fetch) or global fetch.
Hi @BoZhang I checked the @google-cloud/security-center library does not provide a built-in option to make calls using an HTTPS-based client like node-fetch or the global fetch API. The library is designed to use gRPC for communication with Google Cloud services and does not offer a direct way to switch to or use alternative HTTP clients.