I'm creating a server to send data to the React UI which I'm receiving from a python app. Python app is not a web app. It's just a script. What I'm doing is I'm sending a JSON object to a route from python when the script is executed. Then I need the react app to receive the data and render it in the View. How can I do that ? I created a route and made a POST request from Python script to that route so I receive the data in the node. It works, what I need now is to send a POST request inside that POST request (which I receive data from Python script) , As making a POST request inside another POST request is impossible, how can I do this ?This is my route which I receive data.app.post('/getdatafromapp', (req,res) => { console.log("Got data"); let data = req.body; console.log(data); res.send('Hello'); });I need to make a POST request with data (req.body of the above POST request) as the body, to React frontend. How can I do that ?Any help would be appreciated. Thanks.
Submitted June 23, 2018 at 02:39PM by sp3co92
No comments:
Post a Comment