Hi, I am working with nodejs to create my own API, but to do so I ask for the data of another API
const router = require('express').Router();
const request = require('request');
router.get('/randomUser',(req, res) => {
request('https://randomuser.me/api/?inc=login,picture', function(error, response, body) {
res.json(body);
});
});
module.exports = router;
I am using request to interrogate the api, but at the moment of recovering the BODY but it returns this to me
"{\" results \ ": [{\" login \ ": {\" username \ ": \" lazyswan228 \ ", \" password \ ": \" marianne \ ", \" salt \ ": \ "2e0csmRo \", \ "md5 \": \ "684e46e262838036e1fa4fd20dea3f684e42110f \", \ "sha256 \": \ "42ed12f507e14149bdace829a2bcc4c09966648bef7ae1435ebcd0ad4d776768 \"}, \ "picture \": { \ "large \": \ " link \", \ "medium \": \ " link \ ", \" thumbnail \ ": \" link \"}}], \ "info \": {\ "seed \": \ "14f7671e0390d291 \", \ "results \ ": 1, \" page \ ": 1, \" version \ ": \" 1.1 \ "}}"