on-internet
← Community

How to make an Async/await fetch post? getting 500 internal server error

Stack Overflow ·

I have succesfuly made a fetch post to my php api with my thisWorks() function, but I am trying to use fetch with async/await post () function but I keep getting back a 500 internal server error response when trying to do this which I'm not sure how to debug since my code in my async function is mostly the same as in thisWorks(). here are the two functions - //I can make a succesful post to my api with this function and it returns a 200 ok response from the server function thisWorks(title, message, author, id) { fetch("http://menu.com/menu/api/post/create.php", { method: "POST", headers: new H

Comments

Sign in or sign up to comment and upvote.

No comments yet.