他們給出了這個(gè)代碼示例const axios = require('axios');const params = { access_key: 'YOUR_ACCESS_KEY'}axios.get('https://api.aviationstack.com/v1/flights', {params}) .then(response => { const apiResponse = response.data; if (Array.isArray(apiResponse['results'])) { apiResponse['results'].forEach(flight => { if (!flight['live']['is_ground']) { console.log(`${flight['airline']['name']} flight ${flight['flight']['iata']}`, `from ${flight['departure']['airport']} (${flight['departure']['iata']})`, `to ${flight['arrival']['airport']} (${flight['arrival']['iata']}) is in the air.`); } }); } }).catch(error => { console.log(error); });但是我應(yīng)該如何在 Postman 中沒(méi)有變量作為上面的“參數(shù)”的情況下使用 api 密鑰?
使用 Postman 從 aviationsstack API 獲取數(shù)據(jù)
猛跑小豬
2023-03-18 16:27:30