【发布时间】:2016-03-05 20:05:04
【问题描述】:
大家好,我是 JSON 新手,所以我想创建一个“城市”搜索栏,以便用户可以使用 openweathermap API 检索该特定城市的天气。
这是您应该请求它的方式,但我想以这样一种方式制作“q”,以便当在搜索栏中正确键入城市时,它会自动检索该城市的数据。 "http://api.openweathermap.org/data/2.5/weather?q=Toronto,ca&units=metric&APPID=95d38c513c13444b6290e62403391b4e"
感谢您的帮助。
【问题讨论】:
标签: javascript json rest weather-api openweathermap