Merge pull request #6 from dgw/https-api

Switch to HTTPS API URL
This commit is contained in:
Jason R. Coombs 2016-04-29 08:43:57 -04:00
commit 6bb210af63

View File

@ -77,7 +77,7 @@ class Client(object):
input=query, input=query,
appid=self.app_id, appid=self.app_id,
)) ))
url = 'http://api.wolframalpha.com/v2/query?' + query url = 'https://api.wolframalpha.com/v2/query?' + query
resp = urllib.request.urlopen(url) resp = urllib.request.urlopen(url)
assert resp.headers.get_content_type() == 'text/xml' assert resp.headers.get_content_type() == 'text/xml'
assert resp.headers.get_param('charset') == 'utf-8' assert resp.headers.get_param('charset') == 'utf-8'