version 1.62, 2024/03/29 21:27:35 |
version 1.63, 2024/03/29 21:30:03 |
Line 57 async function sendData() { |
|
Line 57 async function sendData() { |
|
//}); |
//}); |
/* --------------------- */ |
/* --------------------- */ |
//ovar re=""; |
//ovar re=""; |
//const dataToSend = JSON.stringify({"email": "hey@mail.com", "password": "101010"}); |
const dataToSend = JSON.stringify({"email": "hey@mail.com", "password": "101010"}); |
//let dataReceived = ""; |
//let dataReceived = ""; |
//fetch("/feedbk/", { |
//fetch("/feedbk/", { |
// credentials: "same-origin", |
// credentials: "same-origin", |
Line 83 async function sendData() { |
|
Line 83 async function sendData() { |
|
// }) |
// }) |
//console.log(`Received: ${dataReceived}`) |
//console.log(`Received: ${dataReceived}`) |
|
|
fetch("/feedbk/") |
fetch("/feedbk/", { |
|
credentials: "same-origin", |
|
mode: "same-origin", |
|
method: "post", |
|
headers: { "Content-Type": "application/json" }, |
|
body: dataToSend |
|
}) |
.then(response => response.json()) |
.then(response => response.json()) |
.then(json => console.log(json)) |
.then(json => console.log(json)) |
|
|