Merge pull request #391 from Aquafina-water-bottle/readme_localhost
Updated Python example code to use 127.0.0.1 instead of localhost
This commit is contained in:
commit
eef3be8599
@ -102,7 +102,7 @@ def request(action, **params):
|
||||
|
||||
def invoke(action, **params):
|
||||
requestJson = json.dumps(request(action, **params)).encode('utf-8')
|
||||
response = json.load(urllib.request.urlopen(urllib.request.Request('http://localhost:8765', requestJson)))
|
||||
response = json.load(urllib.request.urlopen(urllib.request.Request('http://127.0.0.1:8765', requestJson)))
|
||||
if len(response) != 2:
|
||||
raise Exception('response has an unexpected number of fields')
|
||||
if 'error' not in response:
|
||||
|
Loading…
Reference in New Issue
Block a user