Hi, when I send a request using js to my function, the request method changes from POST to OPTIONS. It works as POST on postman, or python script, but not when I use js.. anyone seen this before?
fetch(apiUrl, {
method: 'POST',
headers: myHeaders,
body: JSON.stringify(data),
redirect: "follow"
// body: JSON.stringify({
// data: JSON.stringify(data), // Data needs to be a string inside the outer JSON payload
// async: false
// })
})
I tried the 2 approaches above..
Are you making this request from a web app? If so, it's expected. Browsers make an OPTIONS call first to check for CORS
Recommended threads
- Function failing with no real explainati...
```js import {Client, ID, Messaging} from 'node-appwrite'; export default async ({req, res, log, error}) => { if (req.method !== 'GET') return res...
- Bun Runtime
Any chance we could get Bun 1.3.8 added to the runtimes? We're currently on 1.1 and the update would be awesome
- Gitlab function automation
Im trying to automate my function deployment using gitlabs ci/cd pipeline. Im currently failing trying to use the appwrite cli to create a new deployment. ```...