X7ROOT File Manager
Current Path:
/opt/hc_python/share/doc/pycurl/examples/quickstart
opt
/
hc_python
/
share
/
doc
/
pycurl
/
examples
/
quickstart
/
📁
..
📁
__pycache__
📄
file_upload_buffer.py
(311 B)
📄
file_upload_real.py
(291 B)
📄
file_upload_real_fancy.py
(483 B)
📄
follow_redirect.py
(250 B)
📄
form_post.py
(564 B)
📄
get.py
(583 B)
📄
get_python2.py
(447 B)
📄
get_python2_https.py
(498 B)
📄
get_python3.py
(403 B)
📄
get_python3_https.py
(454 B)
📄
put_buffer.py
(472 B)
📄
put_file.py
(300 B)
📄
response_headers.py
(2.05 KB)
📄
response_info.py
(498 B)
📄
write_file.py
(357 B)
Editing: response_info.py
#! /usr/bin/env python # -*- coding: utf-8 -*- # vi:ts=4:et import pycurl try: from io import BytesIO except ImportError: from StringIO import StringIO as BytesIO buffer = BytesIO() c = pycurl.Curl() c.setopt(c.URL, 'http://pycurl.io/') c.setopt(c.WRITEDATA, buffer) c.perform() # HTTP response code, e.g. 200. print('Status: %d' % c.getinfo(c.RESPONSE_CODE)) # Elapsed time for the transfer. print('Time: %f' % c.getinfo(c.TOTAL_TIME)) # getinfo must be called before close. c.close()
Upload File
Create Folder