10 lines
No EOL
252 B
JavaScript
10 lines
No EOL
252 B
JavaScript
const request = require("request");
|
|
|
|
module.exports = async function(url) {
|
|
return new Promise((resolve, reject) => {
|
|
request(url, (err, res, body) => {
|
|
if (err) reject(err);
|
|
else resolve(body);
|
|
});
|
|
});
|
|
} |