Skip to main content

backports.method_request

Project description

https://img.shields.io/pypi/v/backports.method_request.svg https://img.shields.io/pypi/pyversions/backports.method_request.svg https://img.shields.io/pypi/dm/backports.method_request.svg https://img.shields.io/travis/jaraco/backports.method_request/master.svg

A backport of the urllib.request.MethodRequest class from Python 3.4 which allows overriding of the method in a class attribute or as a keyword parameter to the initializer.

See Python 18978 for details.

Works on Python 2.6 and later.

License

License is indicated in the project metadata (typically one or more of the Trove classifiers). For more details, see this explanation.

Usage

Use method_request.Request in place of urllib.request.Request:

from backports.method_request import Request

req = Request(..., method='PATCH')
resp = urllib.request.urlopen(req)
...

Project details


Download files

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

Files for backports.method_request, version 1.2
Filename, size File type Python version Upload date Hashes
Filename, size backports.method_request-1.2-py2.py3-none-any.whl (4.3 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size backports.method_request-1.2.tar.gz (4.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page