Tutorial posting data to json-server

Posted in Uncategorized

Tweet This Share on Facebook Bookmark on Delicious Digg this Submit to Reddit

Continuing from the last tutorial, we had set up json-server and learned how to get mock data from it. In this tutorial, we will post to the json-server.

Right now, we have two movies in the json-server …

Using Postman api testing tool, set the “Content-Type” to “application/json” in the header. And then post the following json …

Re-run the query and you see we now have three movies. You can omit the “id” field when posting and json-server will add the next unique value for you.

Press “s and enter” and it will save the movies.json file.


Related Posts

Tags

Share This