Stack Overflow Asked by mikkylekyle on January 12, 2021
How can do a request to endpoint from express.js? i want to do a POST request to an url external,
i am using request library but this is deprecated also i want to send this data req.body.options
app.post(
'sendData',
async (req, res) => {
var url =
'http://myUrl'
request.post(
url,
{
options : req.body.options,
},
(error, res, body) => {
if (error) {
console.error(error)
return
}
I have tried but dont work that code, i want to use http
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP