When I send the same POST
request with a cURL command, I get this as response:
JavaScript
x
2
1
{"allowed":[],"error":null}
2
When I add the POST
request in my code and print it with console.log("response: ", response);
or console.log("response: ", response.data);
, I get this printed
JavaScript
1
2
1
'response: ,[object Object]'
2
How can I see the content of the response printed in my logs?
Advertisement
Answer
You can use console.log("response: ", JSON.stringify(response.data))
to see the content of the object in console.