Hello,
I have a problem with the connexion with the server.
My navigator (Chrome) return ERR_EMPTY_RESPONSE when I want to send a POST request. My URL seems to be good on the request and on the config.
await fetch("https://ac-***-shard-00-01.****.mongodb.net:27017/events", {
method: "POST",
headers: {
"Accept": "application/json",
"Content-type": "application/json",
},
body: JSON.stringify(data),
})
console.log(data);
const mongoose = require("mongoose");
mongoose.connect(
"mongodb+srv://***:***@ffc.kv8qoen.mongodb.net/?retryWrites=true&w=majority",
{ useNewUrlParser: true, useUnifiedTopology: true },
(err) => {
if (!err) console.log("Mongodb connected");
else console.log("Connection error :" + err);
}
);
Thanks for your help