/usr/share/doc/python3-pycurl/examples/quickstart
NameSizeModeActions
file_upload_buffer.py3110644editdlrm
file_upload_real.py2910644editdlrm
file_upload_real_fancy.py4830644editdlrm
follow_redirect.py2500644editdlrm
form_post.py5640644editdlrm
get.py5830644editdlrm
get_python2.py4470644editdlrm
get_python2_https.py4980644editdlrm
get_python3.py4030644editdlrm
get_python3_https.py4540644editdlrm
put_buffer.py4720644editdlrm
put_file.py3000644editdlrm
response_headers.py20970644editdlrm
response_info.py5000644editdlrm
write_file.py3570644editdlrm
Edit: /usr/share/doc/python3-pycurl/examples/quickstart/get_python2_https.py (498B)
#! /usr/bin/env python # -*- coding: utf-8 -*- # vi:ts=4:et import pycurl import certifi from StringIO import StringIO buffer = StringIO() c = pycurl.Curl() c.setopt(c.URL, 'http://pycurl.io/') c.setopt(c.WRITEDATA, buffer) # For older PycURL versions: #c.setopt(c.WRITEFUNCTION, buffer.write) c.setopt(c.CAINFO, certifi.where()) c.perform() c.close() body = buffer.getvalue() # Body is a string in some encoding. # In Python 2, we can print it without knowing what the encoding is. print(body)