
I am trying to send a post request to one of my functions and I always get an CORS Error `<script> const url = "https://sample.appwrite.global/"; const headers = { "Content-Type": "application/json" };
const data = { "key": "", "uid": "" };
fetch(url, { method: 'POST', headers: headers, body: JSON.stringify(data) }) .then(response => response.text()) .then(data => console.log(data)) .catch(error => console.error('Error:', error));
</script>`
This is the code on the client side 👆
I have attached the error screenshot as well as platform web app hostname
Any help would be much appreciated
Recommended threads
- Unable to read session cookie
Hi, when I am hitting Appwrite **/account** API. I am getting the user account details as expected in the response. However, with that API, Appwrite also adds a...
- Database error
My code: await databases.createDocument( process.env.APPWRITE_DATABASE, process.env.APPWRITE_COLLECTION_USER, data.userId, ...
- API preflight request not working on .f...
When I am calling a function on my APP through the domain is failing. Because the preflight request (OPTIONS HTTP request) times out. this only occurs with fu...
