2
Well, your curl command is posting as Content-Type: application/x-www-form-urlencoded
format, whereas you are forcing to post as json (.JSON
). For this reason the request has passed as application/json
to your django and you are seeing the parameter in body instead of POST.items()
.
So remove this from your code encoding: .JSON
.
Source:stackexchange.com