@@ -277,14 +277,7 @@ def _request(self, method, url,
277
277
and the server response object, if ``save`` is True and ``return_response_on_save``
278
278
is True.
279
279
"""
280
- req_kwargs = dict (
281
- params = params ,
282
- data = data ,
283
- headers = headers ,
284
- files = files ,
285
- timeout = timeout ,
286
- json = json
287
- )
280
+
288
281
if save :
289
282
local_filename = url .split ('/' )[- 1 ]
290
283
if os .name == 'nt' :
@@ -296,13 +289,15 @@ def _request(self, method, url,
296
289
response = self ._download_file (url , local_filepath , cache = cache , timeout = timeout ,
297
290
continuation = continuation , method = method ,
298
291
allow_redirects = allow_redirects ,
299
- auth = auth , ** req_kwargs )
292
+ auth = auth , params = params , data = data , headers = headers ,
293
+ files = files , json = json )
300
294
if return_response_on_save :
301
295
return local_filepath , response
302
296
else :
303
297
return local_filepath
304
298
else :
305
- query = AstroQuery (method , url , ** req_kwargs )
299
+ query = AstroQuery (method , url , params = params , data = data , headers = headers ,
300
+ files = files , timeout = timeout , json = json )
306
301
if ((self .cache_location is None ) or (not self ._cache_active ) or (not cache )):
307
302
with suspend_cache (self ):
308
303
response = query .request (self ._session , stream = stream ,
0 commit comments