Axios - HTTP requests
10/22/22Less than 1 minute
Axios is a promise-based web request library that works in node.js and browsers. It provides easy envelopes for HTTP requests.
Auto.js Pro has built-in version 1.1.3 of the module (in Pro 9.2 and earlier versions 0.21.1), and you don't need to install it to use axios. Of course you can also install other versions of axios yourself, without worrying about conflicts with the built-in version.
The suggestion
Axios official Chinese documentation
"nodejs";
const axios = require('axios');
async function main() {
// Send a request
try {
const res = await axios.get('https://www.baidu.com');
console.log(res);
} catch (e) {
console.error(e);
}
}
main();Please seeThe official Chinese documentation of axiosMore API introductions and examples are available.
