-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Closed
Description
Checklist
- I have reduced the issue to the simplest possible case.
With the following view:
@api_view(['POST'])
@parser_classes([JSONParser])
def my_view(request):
request.data['change_me'] = 'MyValue'By sending a request with Content-Type: multipart/form-data (with at least one key/value pair, if it's empty it still goes through but doesn't trip up weirdly enough) one will observe the following behaviour:
AttributeError at $myViewsURL This QueryDict instance is immutable
What surprises me is that as I've specified the use of only the JSONParser, I should expect request.data to be a dict. I've tried other content-types and they are correctly rejected before parsing, but this one goes through.
Metadata
Metadata
Assignees
Labels
No labels