Re: Support POST of application/json content type

2013-10-09 Thread abh2134
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

django.test.client: Improper POST requests

2013-08-29 Thread abh2134
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