Skip to main content

An easy to use HTTP client

Project description

Description

An easy to use HTTP client.

Installation

$ pip install urlfetch -U

Hello World

from urlfetch import get

response = get('http://python.org/')
print response.body

Upload file

from urlfetch import post

response = post(
    'http://127.0.0.1:8888/upload',
    headers = {
        'Referer': 'http://127.0.0.1/',
    },
    files = {
        'fieldname1': open('/path/to/file', 'rb'),
        #'fieldname2': 'file content', # file must have a filename
        'fieldname3': ('filename', open('/path/to/file2', 'rb')),
        'fieldname4': ('filename', 'file content'),
    },
    data = {
        'foo': 'bar'
    },
)

print response.status, response.body

Contributors

Project details


Release history Release notifications

History Node

1.0.3

History Node

1.0.2

History Node

1.0.1

History Node

1.0

History Node

0.6.2

History Node

0.6.1

History Node

0.6

History Node

0.5.7

History Node

0.5.6

History Node

0.5.5

History Node

0.5.4.2

History Node

0.5.4.1

History Node

0.5.4

History Node

0.5.3.1

History Node

0.5.3

History Node

0.5.2

History Node

0.5.1

History Node

0.5.0

History Node

0.4.3

History Node

0.4.2

History Node

0.4.1

This version
History Node

0.4.0

History Node

0.3.7

History Node

0.3.6

History Node

0.3.5

History Node

0.3.4

History Node

0.3.3

History Node

0.3.2

History Node

0.3.1

History Node

0.3.0

History Node

0.2.2

History Node

0.2.1

History Node

0.2

History Node

0.1.11

History Node

0.1.7

History Node

0.1.6

History Node

0.1.5

History Node

0.1.4

History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

History Node

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
urlfetch-0.4.0.tar.bz2 (19.1 kB) Copy SHA256 hash SHA256 Source None Jul 1, 2012
urlfetch-0.4.0.tar.gz (22.0 kB) Copy SHA256 hash SHA256 Source None Jul 1, 2012
urlfetch-0.4.0.zip (24.2 kB) Copy SHA256 hash SHA256 Source None Jul 1, 2012

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page