@@ -219,15 +219,15 @@ def send_request(self, method, url, bucket, timeout=30, **kwargs):
219
219
for j in range (self ._retry + 1 ):
220
220
try :
221
221
if method == 'POST' :
222
- res = self ._session .post (url , timeout = timeout , proxies = self ._conf .proxies , ** kwargs )
222
+ res = self ._session .post (url , timeout = timeout , proxies = self ._conf ._proxies , ** kwargs )
223
223
elif method == 'GET' :
224
- res = self ._session .get (url , timeout = timeout , proxies = self ._conf .proxies , ** kwargs )
224
+ res = self ._session .get (url , timeout = timeout , proxies = self ._conf ._proxies , ** kwargs )
225
225
elif method == 'PUT' :
226
- res = self ._session .put (url , timeout = timeout , proxies = self ._conf .proxies , ** kwargs )
226
+ res = self ._session .put (url , timeout = timeout , proxies = self ._conf ._proxies , ** kwargs )
227
227
elif method == 'DELETE' :
228
- res = self ._session .delete (url , timeout = timeout , proxies = self ._conf .proxies , ** kwargs )
228
+ res = self ._session .delete (url , timeout = timeout , proxies = self ._conf ._proxies , ** kwargs )
229
229
elif method == 'HEAD' :
230
- res = self ._session .head (url , timeout = timeout , proxies = self ._conf .proxies , ** kwargs )
230
+ res = self ._session .head (url , timeout = timeout , proxies = self ._conf ._proxies , ** kwargs )
231
231
if res .status_code < 400 : # 2xx和3xx都认为是成功的
232
232
return res
233
233
except Exception as e : # 捕获requests抛出的如timeout等客户端错误,转化为客户端错误
0 commit comments