p8ul/django-rest-framework-boilerplate

Inverted HTTP verbs

wolfracer opened this issue · 4 comments

i think the convention is that you use POST for creating, and GET for retriving and listing users

p8ul commented

Hi @wolfracer ,

Do you mind include a piece of code or link to the code that you believe has broken the HTTP convention? I would also advise you to go through the DRF generic views API. For instance, to retrieve & list users, class UserListAPIView(ListAPIView): We are using ListAPIView which provides GET method handler.

Hi @wolfracer ,

Do you mind include a piece of code or link to the code that you believe has broken the HTTP convention? I would also advise you to go through the DRF generic views API. For instance, to retrieve & list users, class UserListAPIView(ListAPIView): We are using ListAPIView which provides GET method handler.

i think the problem its just in the readme file, it says GET for create user and POST for listing users

p8ul commented

Sure @wolfracer , sorry about the README file misinformation. I have updated it to show the correct HTTP verb. Feel free to raise a PR to improve the boilerplate :)