PATH:
opt
/
hc_python
/
share
/
doc
/
pycurl
/
examples
/
quickstart
#! /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()
[-] get_python3_https.py
[edit]
[+]
__pycache__
[-] get_python2.py
[edit]
[-] put_file.py
[edit]
[-] response_headers.py
[edit]
[-] get_python3.py
[edit]
[-] put_buffer.py
[edit]
[-] write_file.py
[edit]
[+]
..
[-] file_upload_real_fancy.py
[edit]
[-] response_info.py
[edit]
[-] file_upload_real.py
[edit]
[-] get_python2_https.py
[edit]
[-] follow_redirect.py
[edit]
[-] form_post.py
[edit]
[-] file_upload_buffer.py
[edit]
[-] get.py
[edit]