Closed jstrother closed 7 years ago
Hi,
I'm having issues getting the JSON to display in my console even when it is set to true. I know I'm getting a response from the API I'm using, but it only displays as '[object Object]'.
const rp = require('request-promise'), leagues = { uri: 'https://soccer.sportmonks.com/api/v2.0/leagues?{SUPER_SECRET_API_KEY}', json: true }; return rp(leagues) .then(leagues => { console.log(`leagues: ${leagues}`); return leagues; }) .catch(error => { console.log(`leagues error: ${error}`); });
Am I missing something? Or is the package not firing on all cylinders? I'm using v4.2.1
Thanks!
Never mind. A youngster not coding correctly here. I got it fixed. I can't console.log these in a template string. Feel free to close this issue.
Alright, no problem. Happy coding! :)
Hi,
I'm having issues getting the JSON to display in my console even when it is set to true. I know I'm getting a response from the API I'm using, but it only displays as '[object Object]'.
Am I missing something? Or is the package not firing on all cylinders? I'm using v4.2.1
Thanks!