Hi, How can we hide API calls from a network call?
Hi @Ankesh_Ojha, I assume you want to hide API credentials from being exposed when calling an external HTTP API from a frontend app.
To achieve this, you should use Request Method with iparams template substitution. Please see the “Using iparams” section in the Request Method documentation.
Hi @kaustavdm , but we want to send form data as a body in request and having size 1MB and in other API we want a content type as application/octet-stream will Request Method will be able to do it?
No, I am afraid 1MB is beyond the payload size that Request Method allows today. It also does not allow
You can use SMI to send the requests from serverless, which you invoke from the frontend. You will have to use a custom 3rd party HTTP client in the SMI function. That way, you will only send the payload from the frontend. The credentials will be transparently handled in the serverless function.
Hi, while invoking a Request Method from the front end to the Serverless component if we are sending form data in the payload to smi argument will it work , i have tried it shows an error in passing form data.