import http.client conn = http.client.HTTPConnection("localhost", 6000) payload = "{}" headers = { 'Content-Type': 'application/json', 'tenantalias': 'tenantA', 'Authorization': 'Basic bewwGltfeczpsaW1zIzE=', 'Cookie': 'JSESSIONID=B56B29D4383ECE84F008B47460C322B5' } conn.request("POST", "http://localhost:6000/getResponse", payload, headers) res = conn.getresponse() data = res.read() print(data) print(res)