API / JSON Request

Hello! I am working with the FAA’s API and I am having an issue with my below code. In the last two lines I am trying to save my save the URL associated with my request to the variable called airport_dtw_url, however nothing happens. I do not get an error code or traceback… Any help would be greatly appreciated.

url_parameters = {}
url_parameters["format"] = "json"

base_url = 'http://services.faa.gov/airport/status/'
airport = 'DTW'
airport_response = requests.get(base_url+airport, params = url_parameters)
airport_dtw_url = airport_response
print airport_dtw_url

You’ve got two variables referring to the same value, forgot to call some method/look up some attribute?

You say nothing happens, but perhaps you should look closer at the response you got? (What events were supposed to happen and what code corresponds to that) Something gets printed, so something does happen

1 Like

Awesome thank you I forgot to call a method, instead I just reassigned the variable!