Get data from a request using Django

I have this middleware built with Node.js. Its function is sending a continuous data to a provided URL (to my Python project).

In my Node JavaScript:

const payload = {dictionary data};
var obj = { data: payload };
jsonobj = JSON.stringify(obj);;
var XMLHttpRequest = require("xhr2");
var xhr = new XMLHttpRequest();"POST", "mypythonURL/", true);
xhr.setRequestHeader("Content-Type", "application/json;charset=UTF-8");

I'm receiving it, my terminal is reacting it says that

[07/Sep/2022 22:20:28] "POST /mypythonURL/ HTTP/1.1" 200 353

Any idea how I can fetch the data from that request POST?

Back to Top