mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
fix for #160
This commit is contained in:
@@ -44,3 +44,4 @@ Patches and Suggestions
|
||||
- Johan Bergström
|
||||
- Josselin Jacquard
|
||||
- Mike Waldner
|
||||
- Serge Domkowski
|
||||
+2
-3
@@ -17,10 +17,10 @@ from .status_codes import codes
|
||||
from .hooks import dispatch_hook
|
||||
from .utils import cookiejar_from_dict, header_expand
|
||||
|
||||
from urlparse import urlparse
|
||||
|
||||
__all__ = ('request', 'get', 'head', 'post', 'patch', 'put', 'delete')
|
||||
|
||||
|
||||
def request(method, url,
|
||||
params=None, data=None, headers=None, cookies=None, files=None, auth=None,
|
||||
timeout=None, allow_redirects=False, proxies=None, hooks=None):
|
||||
@@ -88,7 +88,6 @@ def request(method, url,
|
||||
|
||||
|
||||
def get(url, **kwargs):
|
||||
|
||||
"""Sends a GET request. Returns :class:`Response` object.
|
||||
|
||||
:param url: URL for the new :class:`Request` object.
|
||||
@@ -144,7 +143,7 @@ def patch(url, data='', **kwargs):
|
||||
:param **kwargs: Optional arguments that ``request`` takes.
|
||||
"""
|
||||
|
||||
return request('patch', url, **kwargs)
|
||||
return request('patch', url, data=data, **kwargs)
|
||||
|
||||
|
||||
def delete(url, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user