Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

Commit

Permalink
Merge pull request #391 from Aquafina-water-bottle/readme_localhost
Browse files Browse the repository at this point in the history
Updated Python example code to use 127.0.0.1 instead of localhost
  • Loading branch information
FooSoft authored Jun 16, 2023
2 parents f27e7b4 + f10abcc commit eef3be8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit eef3be8

Please sign in to comment.