djangorestframework-camel-case icon indicating copy to clipboard operation
djangorestframework-camel-case copied to clipboard

Request body arrives at view/action with camelCase

Open Luctia opened this issue 4 years ago • 0 comments

I have the settings of my project set up as is shown in the documentation. When I send a request to an endpoint like this:

@action(detail=False, methods=['patch'], permission_classes=[IsAuthenticated])
def do_thing(self, request):
    print(request.body)
    return Response()

Then my back-end prints the body with camelCase. Shouldn't it be snake_case at this point? What am I doing wrong, because this is preventing me from saving request.body.

Luctia avatar Jun 30 '21 14:06 Luctia