I am trying to make a post request using pycurl but request hangs infinitely on c.perform()
. My code is:
try:
from io import BytesIO
except ImportError:
from io import StringIO as BytesIO
buffer = BytesIO()
self.c.setopt(self.c.URL, 'http://pycurl.io/')
self.c.setopt(self.c.HEADER, 0)
self.c.setopt(self.c.POST, 1)
self.c.perform()
self.c.close()
body = buffer.getvalue()
status = self.c.getinfo(self.c.HTTP_CODE)
response_data = {
'is_fed_successfully': True
}'
And just to be clear, there's no error. The request just hangs infinitely without any response.