mirror of
https://github.com/drewkerrigan/nagios-http-json.git
synced 2025-05-10 09:53:44 +02:00
Added default User-Agent header
This commit is contained in:
parent
ed7bc7175b
commit
9c7465f8bb
@ -407,6 +407,7 @@ if __name__ == "__main__":
|
||||
# Attempt to reach the endpoint
|
||||
try:
|
||||
req = urllib2.Request(url)
|
||||
req.add_header("User-Agent", "nagios-http-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