我在我的stckblitz项目中进行了http呼叫
http://api.openweathermap.org/data/2.5/weather?q=' + data.city + '&appid=' + this.APIKey
但总是会给出错误
Http failure response for http://api.openweathermap.org/data/2.5/weather?q=london&appid=6492527f849e5034d485df6b5981d407: 0 Unknown Error
答案 0 :(得分:0)
您应该使用https
版的网址:
https://api.openweathermap.org/data/2.5/weather?q=' + data.city + '&appid=' + this.APIKey