06-02-2016 08:17 AM
When performing HTTP GET's to my SX10 I keep getting
<head>
<title>401 Unauthorized</title>
</head>
How can I authenticate in an HTTP GET request?
(think about a Python application that needs information from 1 SX10)
Solved! Go to Solution.
06-02-2016 10:39 AM
06-02-2016 10:39 AM
Answer: basic authentication
DJ
06-07-2016 11:45 PM
Python3 code;
import requests
requests.packages.urllib3.disable_warnings()
sys_url = "https://10.1.1.34/getxml?location=/Status/SystemUnit"
r = requests.get(sys_url, auth=('admin', 'password'), verify=False)
print(r.text)
06-08-2016 07:40 AM
Thank you for sharing this example!
06-08-2016 11:34 PM
You're welcome
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide