Closed garposmack closed 1 month ago
Try to log typeof axios
it will be a function. Because functions cannot be serialised Bruno logs null.
@garposmack Here is a sample axios code
const axios = require("axios");
const response = await axios.get("https://api.github.com/users/usebruno");
console.logresponse.data.avatar_url);
Closing this issue. @garposmack please re-open the issue if you are still struggling to make axios work.
I have checked the following:
Describe the bug
I have the following script in the pre-script of my collection (and also tried in only 1 request)
const axios = require('axios'); console.log(axios);
on the console i get null as a result.I was trying to create a pre-script to fetch a token from an url, and i was not able... and it seems that the reason is because axios is null
I have also tried the same with moment, and got the same result.
.bru file to reproduce the bug
No response
Screenshots/Live demo link