Extreme API with Python
Table Of Contents
- 1 Preface
- 2 Introduction
- 3 EXOS APIs
- 4 VOSS API
- 5 XMC API
- 6 ExtremeCloud IQ API
- 7 Extreme Campus Controller API
Extreme API with Python
Page | 24
Part no.9036931-00 Rev AA February 2021
print(type(data))
print(data)
In the results, you can see that the URL no longer contains a query string, and in the JSON returned,
there is a form entry with the data you sent.
HTTPS://httpbin.org/post
200
application/json
{
"args": {},
"data": "",
"files": {},
"form": {
"elite": "1337",
"h2g2": "42"
},
"headers": {
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate",
"Content-Length": "17",
"Content-Type": "application/x-www-form-urlencoded",
"Host": "httpbin.org",
"User-Agent": "python-requests/2.22.0",
"X-Amzn-Trace-Id": "Root=1-5ed8cb37-4c412bacebb72bbcaf3e5bfc"
},
"json": null,
"origin": "109.13.132.180",
"url": "HTTPS://httpbin.org/post"
}
<class 'dict'>
{'args': {}, 'data': '', 'files': {}, 'form': {'elite': '1337', 'h2g2':
'42'}, 'headers': {'Accept': '*/*', 'Accept-Encoding': 'gzip, deflate',
'Content-Length': '17', 'Content-Type': 'application/x-www-form-urlencoded',
'Host': 'httpbin.org', 'User-Agent': 'python-requests/2.22.0', 'X-Amzn-Trace-
Id': 'Root=1-5ed8cb37-4c412bacebb72bbcaf3e5bfc'}, 'json': None, 'origin':
'109.13.132.180', 'url': 'HTTPS://httpbin.org/post'}
Another option when using the requests.get function is the timeout parameter. Without this parameter,
the requests module waits indefinitely for an answer, which can be a problem if you have made a
mistake. This can also result in very slow server speeds and you don’t want the application to spend too
much time waiting. You can set a limit before raising an error. Httpbin can help you to simulate this,
with the delay service in the dynamic data menu. To call it, add /delay/<value in seconds> to the URL.
For example:
import requests










