Am trying to connect an API in my organization, but am always receiving the below error message. But being able to connect other similar API/reports using the same below script. Am able to get results when running the API URL in a web browser. So there is no authentication issues.
I believe the server closed before sending any response.
Kindly help me to resolve this.
Error Message: RemoteDisconnected: "Remote end closed connection without response"
Code :
import http.client
import pandas as pd
import json
import requests
conn=http.client.HTTPSConnection("abc.com")
headers = {
'authorization' : 'xyz'
'cache-control': "no-cache"
'postman-token: 'xyz'
}
url='xxyyzz'
conn.request("GET",url,headers=headers)
res=conn.getresponse()
data=res.read()
data_z=json.loads(data)
df=pd.DataFrame(datax['rows'])