[Mod] HttpClient:HTTP请求成功的标准从status_code==200修改为status_code==2xx
This commit is contained in:
parent
6b19abc875
commit
5d0de90e60
@ -210,7 +210,7 @@ class HttpClient(object):
|
|||||||
req._response = response
|
req._response = response
|
||||||
|
|
||||||
httpStatusCode = response.status_code
|
httpStatusCode = response.status_code
|
||||||
if httpStatusCode == 200:
|
if httpStatusCode/100 == 2:
|
||||||
jsonBody = response.json()
|
jsonBody = response.json()
|
||||||
req.callback(jsonBody, req)
|
req.callback(jsonBody, req)
|
||||||
req._status = RequestStatus.success
|
req._status = RequestStatus.success
|
||||||
|
Loading…
Reference in New Issue
Block a user