I have a renderer.js file that amongst other things it captures a screenshot from the webcam and sends to an API. The problem I'm having is that the minute the request is sent, the page gets reloaded, I don't even get to see the response and I don't know why. This is the code:
method: "POST", body: formData, headers: {
'X-RapidAPI-Key': 'your-rapidapi-key'
}
});
console.log(response.json());```
The page is reloaded even before I get to `console.log`. Any ideas why? This is *not* an issue where I should use `event.preventDefault()` as I already tried and this is not triggered by a form