0

i making a http call in my stckblitz project

http://api.openweathermap.org/data/2.5/weather?q=' + data.city + '&appid=' + this.APIKey

but it always gives an error

Http failure response for http://api.openweathermap.org/data/2.5/weather?q=london&appid=6492527f849e5034d485df6b5981d407: 0 Unknown Error

https://stackblitz.com/edit/angular-open-weather-app

conrad
  • 51
  • 8

1 Answers1

0

You should use the https version of the url:

https://api.openweathermap.org/data/2.5/weather?q=' + data.city + '&appid=' + this.APIKey

Yusef Maali
  • 2,201
  • 2
  • 23
  • 29