/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/file_upload_real_fancy.py (483B)
#! /usr/bin/env python # -*- coding: utf-8 -*- # vi:ts=4:et import pycurl c = pycurl.Curl() c.setopt(c.URL, 'https://httpbin.org/post') c.setopt(c.HTTPPOST, [ ('fileupload', ( # upload the contents of this file c.FORM_FILE, __file__, # specify a different file name for the upload c.FORM_FILENAME, 'helloworld.py', # specify a different content type c.FORM_CONTENTTYPE, 'application/x-python', )), ]) c.perform() c.close()