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 odpowiedzi
+ 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