From: Kenneth Reitz Date: Wed, 17 Aug 2011 06:01:19 +0000 (-0400) Subject: ACTIVVVAATTTEEEEEEE X-Git-Tag: v0.6.0~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=66391e5c9da77889ebaf1c8a1cd3f84543d6943b;p=services%2Fpython-requests.git ACTIVVVAATTTEEEEEEE --- diff --git a/requests/api.py b/requests/api.py index a433b0e..9c923e5 100644 --- a/requests/api.py +++ b/requests/api.py @@ -15,7 +15,9 @@ import config from .models import Request, Response, AuthObject from .status_codes import codes from .hooks import dispatch_hook +from .utils import cookiejar_from_dict +from urlparse import urlparse __all__ = ('request', 'get', 'head', 'post', 'patch', 'put', 'delete') @@ -39,6 +41,11 @@ def request(method, url, :param proxies: (optional) Dictionary mapping protocol to the URL of the proxy. """ + if cookies is None: + cookies = {} + + cookies = cookiejar_from_dict(cookies) + args = dict( method = method, url = url,