2👍
If your issue is to return a 202 HTTP status code instead of the default 200, you could try to use the status
parameter as follows:
@csrf_exempt
def test(request):
data = {'foo': 'bar', 'hello': 'world'}
print request.body
return HttpResponse(json.dumps(data), content_type='application/json', status=202)
Source:stackexchange.com