Right now when I'm writing my code my pycurl response returns my json information but its just showing as one string instead of returning it formatted. I'd like it to format but everything I've tried seems to fail on every front.
import pycurl
from StringIO import StringIO
try:
from io import BytesIO
except ImportError:
from StringIO import StringIO as BytesIO
data = StringIO()
c = pycurl.Curl()
c.setopt(c.URL, fullurl)
c.setopt(pycurl.HTTPHEADER, [Api_info_a:Api_infoB])
c.setopt(pycurl.SSL_VERIFYPEER, 0)
c.setopt(pycurl.SSL_VERIFYHOST, 0)
c.perform()
print data()
Is there something in pycurl that formats this properly that I'm possibly missing? I've tried pprint, dumping it into json and making it a json.dumps when I print out and each time I get one long string. I've also attempted to add separator values and that has also failed.
Any help would be great thanks!