@@ -61,7 +61,7 @@ def _pycurl_post(self,
6161 username = "" ,
6262 password = "" ,
6363 xapikey = "" ,
64- headers = {} ,
64+ headers = None ,
6565 timeout = 30 ):
6666 """This function will POST to the url endpoint using pycurl. returning
6767 an AdyenResult object on 200 HTTP responce. Either json or data has to
@@ -89,6 +89,8 @@ def _pycurl_post(self,
8989 int: HTTP status code, eg 200,404,401
9090 dict: Key/Value pairs of the headers received.
9191 """
92+ if headers is None :
93+ headers = {}
9294
9395 response_headers = {}
9496
@@ -148,7 +150,7 @@ def _requests_post(self, url,
148150 username = "" ,
149151 password = "" ,
150152 xapikey = "" ,
151- headers = {} ,
153+ headers = None ,
152154 timeout = 30 ):
153155 """This function will POST to the url endpoint using requests.
154156 Returning an AdyenResult object on 200 HTTP response.
@@ -176,6 +178,8 @@ def _requests_post(self, url,
176178 int: HTTP status code, eg 200,404,401
177179 dict: Key/Value pairs of the headers received.
178180 """
181+ if headers is None :
182+ headers = {}
179183
180184 # Adding basic auth if username and password provided.
181185 auth = None
@@ -204,7 +208,7 @@ def _urllib_post(self, url,
204208 username = "" ,
205209 password = "" ,
206210 xapikey = "" ,
207- headers = {} ,
211+ headers = None ,
208212 timeout = 30 ):
209213
210214 """This function will POST to the url endpoint using urllib2. returning
@@ -234,6 +238,9 @@ def _urllib_post(self, url,
234238 dict: Key/Value pairs of the headers received.
235239 """
236240
241+ if headers is None :
242+ headers = {}
243+
237244 # Store regular dict to return later:
238245 raw_store = json
239246
0 commit comments