mirror of
https://github.com/drewkerrigan/nagios-http-json.git
synced 2025-05-10 09:53:44 +02:00
Merge 5d1100e646
into ed7bc7175b
This commit is contained in:
commit
c8b3fce796
@ -407,6 +407,7 @@ if __name__ == "__main__":
|
||||
# Attempt to reach the endpoint
|
||||
try:
|
||||
req = urllib2.Request(url)
|
||||
req.add_header('Content-Type', 'application/json')
|
||||
if args.auth:
|
||||
base64str = base64.encodestring(args.auth).replace('\n', '')
|
||||
req.add_header('Authorization', 'Basic %s' % base64str)
|
||||
|
Loading…
Reference in New Issue
Block a user