跳转到主要内容

backports.method_request

项目描述

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

Python 3.4的urllib.request.MethodRequest类的移植,允许在类属性或初始化器关键字参数中覆盖方法。

有关详细信息,请参阅Python 18978

适用于Python 2.6及更高版本。

许可证

许可证在项目元数据中指示(通常为Trove分类器中的一个或多个)。有关更多详细信息,请参阅此说明

用法

使用method_request.Request代替urllib.request.Request

from backports.method_request import Request

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

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源分布

backports.method_request-1.2.tar.gz (4.6 kB 查看哈希)

上传时间:

构建分布

backports.method_request-1.2-py2.py3-none-any.whl (4.3 kB 查看哈希)

上传于 Python 2 Python 3

由以下支持