-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Server error 500 on POST #798
Comments
The db.json file needs an "id" property |
thank you!! |
Thank you |
just wanted to clarify here that the ids are auto-assigned on post requests sent to json-server, but any data that you've added to db.json yourself needs to have an id property with an integer value. |
I had the same problem, I added an "id" and it worked! thank you! but anyway I don't understand why it needs an "id" ((I'm new with this)) |
thank you! |
thank you ❤️❤️❤️ |
Hi, I am having issues with POST method in my React-Redux app. GET works perfectly fine.
This is the fetch request:
db.json:
If I use instead your Posts json-server, the POST method works fine. https://jsonplaceholder.typicode.com/posts.
Is it possible that my db.json file is wrong, might have any wrong character?
Thanks!
The text was updated successfully, but these errors were encountered: