mirror of
https://github.com/os-mnemo/pan-globalprotect-okta
synced 2026-07-31 15:54:36 +02:00
Debug HTTP headers.
This commit is contained in:
+2
-1
@@ -183,7 +183,8 @@ def send_req(conf, s, name, url, data, **kwargs):
|
||||
r = s.get(url, headers=headers)
|
||||
else:
|
||||
r = s.post(url, data=data, headers=headers)
|
||||
rr = 'status code: {0}, text:\n{1}'.format(r.status_code, r.text)
|
||||
hdump = '\n'.join([k + ': ' + v for k, v in sorted(r.headers.items())])
|
||||
rr = 'status: {0}\n\n{1}\n\n{2}'.format(r.status_code, hdump, r.text)
|
||||
if r.status_code != 200:
|
||||
err('okta {0} request failed. {0}'.format(rr))
|
||||
dbg(conf.get('debug'), '{0}.response'.format(name), rr)
|
||||
|
||||
Reference in New Issue
Block a user