An error in JavaScript fetch api | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

An error in JavaScript fetch api

Uncaught (in promise) Type Error: failed to execute 'fetch' on window : invalid name

10th May 2020, 3:00 PM
Saurabh Sharma
Saurabh Sharma - avatar
2 Antworten
+ 2
Please link your code otherwise it's impossible to find mistake
10th May 2020, 3:05 PM
Raj Chhatrala
Raj Chhatrala - avatar
0
fetch("http://localhost:3000/signup", { method: "POST", body: JSON.stringify(item), headers: { 'Content/Type': 'application/json' }, }) .then((Response) => Response.json()) .then((Result) => { if (Result.message == "Operation Successful") this.props.history.push("/login"); else alert("Sorrrrrry !!!! Un-authenticated User !!!!!"); }); I have the same error here is my code above
13th Jan 2022, 9:59 AM
Boluwatife
Boluwatife - avatar