Using Node JS, I want to get the data that I posted.
in my views. py
if request.method == 'POST':
post_data = json.loads(request.POST.get("data"))
response = requests.post('http://localhost:3000/path/', data={
'data': request.POST.get("data")})
in my node js
const bodyParser = require("body-parser")
const jsonParse = bodyParser.json()
router.post("/path", jsonParse, (req, res) => {
//I have some function here, but I needed to use the data from my
django views.
console.log(req.body) //the console is {}, I want to get the data
that I posted using the django views//})
Maybe my approach is wrong. I am new to node JS that's why I'm asking for help. I'm open to any suggestion. The django views are working. I just don't know how to receive that in Node JS way