Hello guys!
Would you be so kind as to help me with my problem?
I try to interact with Device Expert via API from python script. I sent a POST request to URL like this <Protocol- http or https >://<DeviceExpert-Server-Name>:port/api with following parameters: ACTION = "GET_DEVICE", API_KEY='xxx', IPADDRESS='X.X.X.X', but I have received an empty string.
- import urllib, urllib2
- url = 'https://x.x.x.x/api'
- req = urllib2.Request(url)
- values = {'API_KEY':'xxxxxxxxxxx', 'IPADDRESS':'x.x.x.x', 'ACTION':'GET_DEVICE'}
- data = urllib.urlencode(values)
- req.add_data(data)
- resp = urllib2.urlopen(req)
- resp.read() #empty string ''
I tried the same on php, but received an empty string again. Thanks in advance!
George.