示例代码:
import axios from 'axios';
const headers = { 'Authorization': 'Bearer my-token', 'Content-Type': 'application/json', 'User-Agent': 'Mozilla/5.0', 'Cookie': 'my-cookie' };
axios.get('url', {headers: headers}) .then(response => { console.log(response); }) .catch(error => { console.log(error); });