/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/form_post.py (564B)
#! /usr/bin/env python # -*- coding: utf-8 -*- # vi:ts=4:et import pycurl try: # python 3 from urllib.parse import urlencode except ImportError: # python 2 from urllib import urlencode c = pycurl.Curl() c.setopt(c.URL, 'https://httpbin.org/post') post_data = {'field': 'value'} # Form data must be provided already urlencoded. postfields = urlencode(post_data) # Sets request method to POST, # Content-Type header to application/x-www-form-urlencoded # and data to send in request body. c.setopt(c.POSTFIELDS, postfields) c.perform() c.close()