Hi all,
I would love to be involved with this feature.
My suggestion is to do the following:
- Check requst.is_ajax()
- Check request.META.get('CONTENT_TYPE').count('application/json')
- Parse request.body using django.utils.simplejson.loads
- ... and set *request.JSON* to the resul
Hi all,
Working with django.test.client.
*Running*:
response = self.client.post(url, {"message": "this is a message"}),
content_type="application/json")
*The server receives*:
(Pdb) request.body
"{'platform': 'ios', 'token': '123abc', 'uuid': 'abc123'}"
... which is NOT a valid JSON string. A