如何查看Python的requests.get发送的URL

时间:2018-05-02 04:50:20

标签: python

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字符串,那么如何获取它以便将其打印到屏幕上呢?

0 个答案:

没有答案