From 147c24154e4315750f7513ca387f4b843bcc85d2 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Wed, 9 Nov 2011 15:46:45 -0800 Subject: [PATCH] better defaults for "models" --- requests/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requests/models.py b/requests/models.py index c38f379..3a30aa0 100644 --- a/requests/models.py +++ b/requests/models.py @@ -76,6 +76,7 @@ class Request(object): #: Dictionary or byte of querystring data to attach to the #: :class:`Request `. self.params = None + self.params = dict(params or []) #: True if :class:`Request ` is part of a redirect chain (disables history #: and HTTPError storage). @@ -440,7 +441,7 @@ class Response(object): self.request = None #: A dictionary of Cookies the server sent back. - self.cookies = None + self.cookies = {} #: Dictionary of configurations for this request. self.config = None -- 2.34.1