[Mod] HttpClient:HTTP请求成功的标准从status_code==200修改为status_code==2xx

This commit is contained in:
nanoric 2018-10-10 03:52:27 -04:00
parent 6b19abc875
commit 5d0de90e60

View File

@ -210,7 +210,7 @@ class HttpClient(object):
req._response = response
httpStatusCode = response.status_code
if httpStatusCode == 200:
if httpStatusCode/100 == 2:
jsonBody = response.json()
req.callback(jsonBody, req)
req._status = RequestStatus.success