From 66391e5c9da77889ebaf1c8a1cd3f84543d6943b Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Wed, 17 Aug 2011 02:01:19 -0400 Subject: [PATCH] ACTIVVVAATTTEEEEEEE --- requests/api.py | 7 +++++++ 1 file changed, 7 insertions(+) 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, -- 2.34.1