matthoiland / restful-api-demo

Code from the video titled "Building a RESTful API in 5 Minutes"
116 stars 45 forks source link

Specifing Content-Type:application/json in the request header is required #1

Closed phiphou closed 9 years ago

phiphou commented 9 years ago

Very nice tutorial, but your forgot to mention a important point.

For make POST and PUT requests working, we have to specify Content-Type:application/json in the request header.

In the video, when you test the API POST with Postman (9:14), if we carefully watch, we can notice you already specified it, but don't you think many of us won't see this "detail" ?

Maybe you could add this explanation in the video description or with Youtube annotation or closed caption.

matthoiland commented 9 years ago

Thanks @phiphou !

I've updated the video with an annotation mentioning this. http://youtu.be/p-x6WdwaJco?t=9m3s

phiphou commented 9 years ago

Thanks, Youtube comments showed it was important for beginners ;) They'll all thank you ;)