Skip to content

Commit

Permalink
A Better stick to original migration request
Browse files Browse the repository at this point in the history
  • Loading branch information
hll committed Nov 3, 2020
1 parent 187d8cd commit 44f95fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyekonlib/Migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

def sendCommand(deviceAddr, command, postData):
url = "http://%s/config?command=%s" % (deviceAddr, command)
headers = {'user-agent': 'LuaSocket 2.0.2'}
r = requests.post(url, headers=headers, data=json.dumps(postData))
headers = {'User-Agent': 'LuaSocket 2.0.2', 'Content-Type': 'application/json; charset=utf-8', 'Host': "1.1.1.1"}
r = requests.post(url, headers=headers, data=json.dumps(postData, separators=(',', ':')))
return r.status_code == requests.codes.ok


Expand Down

0 comments on commit 44f95fe

Please sign in to comment.