Hacker News new | past | comments | ask | show | jobs | submit login

Great ideas and tips. As I read through it, I found myself mentally saying "yep, did that" for most of the sections. One thing I disagree with was what to do when a new resource is created. I think the Location header is a great idea (which I'm not doing) but I also think returning the new entity in the body is a good thing in that it saves another request.

The new tips for me were the Link: header for pagination and using 422 Unprocessable Entity for validation errors. How did I overlook 422 before? I've been using 400 for validation problems, which I wasn't very happy with but didn't know what else to use.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: