在the flight aware python example中,我相信函数requests.get正在创建格式为的URL字符串:
https://flightxml.flightaware.com/json/FlightXML3/payload_paramater_string/user_password
import requests
username = "YOUR_USERNAME"
apiKey = "YOUR_API_KEY"
fxmlUrl = "https://flightxml.flightaware.com/json/FlightXML3/"
payload = {'airport_code':'KSFO', 'type':'enroute',
'howMany':'10'}
response = requests.get(fxmlUrl + "AirportBoards",
params=payload, auth=(username, apiKey))
如果requests命令确实创建了一个URL字符串,那么如何获取它以便将其打印到屏幕上呢?