Open gootik opened 3 weeks ago
@gootik we'll look into this. In the meanwhile, you can hit that URL using the regular API query
Thank you @Nikhil-Nandagopal , for this specific issue we would want the call to be from the Client side not server side. so the regular API query would not be sufficient :( Unless we can force the API query to run from client rather than appsmith server?
@gootik Could you please share the exact error you notice in the browser by sharing a screenshot of the same?
Also, the implementation for extracting the JSON with a fetch for your case should be as shown below.
async myFun2 () {
return await fetch('https://api.ipify.org?format=json').then(res => res.json())
}
Is there an existing issue for this?
Description
When I use fetch() on the client side it cannot load resources because of CORS issue.
Steps To Reproduce
await fetch('https://api.ipify.org?format=json')
Public Sample App
No response
Environment
Production
Severity
High (Blocker to building or releasing)
Issue video log
No response
Version
Self Hosted - v1.27