Hello I’m using the example request with my own to...
# questions
k
Hello I’m using the example request with my own token
Copy code
const options = {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
          },
        body: JSON.stringify([
          {
            event: 'string',
            properties: {token: 'token', time: 0, distinct_id: 'string', $insert_id: 'string'}
          }
        ])
      };
      
    const test = fetch('<https://api.mixpanel.com/track>', options)
        .then(response => response.json())
        .then(response => console.log(response))
        .catch(err => console.error(err));
and getting: blocked by CORS policy: Request header field content-type is not allowed by Access-Control-Allow-Headers in preflight response This is a local dev env. Can you advise ?