Update check_http_json.py

Added a request header to specify the Content-Type as application/json.
This commit is contained in:
baddlan 2016-02-19 13:34:02 -05:00
parent ba87c611df
commit 5d1100e646

View File

@ -406,6 +406,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)