i think it's a bug in httplib shipped in old distro.
Signed-off-by: Kefu Chai <kchai@redhat.com>
addr = sys.argv[1]
auth = ('admin', sys.argv[2])
+headers = {'Content-type': 'application/json'}
request = None
request = requests.post(
addr + '/pool?wait=yes',
data=json.dumps({'name': 'supertestfriends', 'pg_num': 128}),
+ headers=headers,
verify=False,
auth=auth)
print(request.text)
request = getattr(requests, method)(
url,
data=json.dumps(args),
+ headers=headers,
verify=False,
auth=auth)
print(request.text)