[Answered ]-Django view recieving incomplete POST payload

1πŸ‘

βœ…

I think you’re just seeing a logging artifact. The message is being delivered as a single POST, but the logger is breaking up the message because it is too long. Instead of just printing the message (which sends it to the server log), use print >> sys.stderr, request.body and it will appear in the error log without truncation.

πŸ‘€Glenn

1πŸ‘

I guess that your print statement is truncating the output of the str(request.body) that happens implicitly, but the actual content of the POST is there. Try this:

import pprint

@csrf_exempt
def stackcommits(request):
    pprint.pprint(request.body)
    return HttpResponse("")
πŸ‘€Tiago

Leave a comment