0

I have been using Yahoo weather api to get weather info for one year. I am using

https://query.yahooapis.com/v1/public/yql?q=select * from weather.forecast where woeid in (SELECT woeid FROM geo.places(1) WHERE text='(31.020780,121.454648)') and u='c' &format=json

and it was working fine.

Recently I began to get "net::ERR_INSECURE_RESPONSE" error in ajax call and get "Your connection is not private" warning when I accessed it thru browsers. It seems that there is no chance the ajax client can programmatically trust the ssl certificate.

Is there anyone have the same problem with me? How to workaround this in JavaScript?

Thanks everyone for the answer. It proves to be a browser issue. https://github.com/brave/browser-laptop/issues/4158 Google chrome version 53 has the problem.

ichbinblau
  • 4,507
  • 5
  • 23
  • 36

1 Answers1

0

Try to change

http://weather.yahooapis.com/

to

http://xml.weather.yahoo.com/

If the above is not working. Head in here. And replicate this and save as .html file and view it in your browser.

Additionaly, try to change query to this:

select * from weather.forecast where woeid in (select woeid from geo.places(1) where text='(31.020780,121.454648)') and u='c'

Hope it works :)

claudios
  • 6,588
  • 8
  • 47
  • 90
  • just try it and let me know if it isn't fix – claudios Dec 01 '16 at 06:48
  • I replaced "https://query.yahooapis.com" with "http://xml.weather.yahoo.com/" but got network error. Seems that the link is not valid. – ichbinblau Dec 01 '16 at 06:49
  • But my problem is insecure ssl certificate. I don't think it would work cos they are still using the same url "https://query.yahooapis.com". And there is no problem with the YQL. It was just blocked by the SSL cert verification. – ichbinblau Dec 01 '16 at 07:20
  • If not can you post the error in your console? @Theresa – claudios Dec 01 '16 at 07:20