For some reason I cannot figure out why Django isn't handling my request.body content correctly.
It is being sent in JSON format, and looking at the Network tab in Dev Tools shows this as the request payload:
{creator: "creatorname", content: "postcontent", date: "05/08/2020"}
which is exactly how I want it to be sent to my API.
In Django I have a view that accepts this request as a parameter and just for my testing purposes, should print request.body["content"] to the console.
Of course, nothing is being printed out, but when I print request.body I get this:
b'{"creator":"creatorname","content":"postcontent","date":"05/08/2020"}'
so I know that I do have a body being sent.
I've tried using json = json.loads(request.body) to no avail either. Printing json after setting that variable also returns nothing.