當python3.2拋出HTTPError
時,如何獲得http
正文。當python3拋出一個HTTPError時,如何獲得http正文
Traceback (most recent call last):
File "C:\Users\RileyRen\Desktop\query_token.py", line 17, in <module>
File "D:\Environment\Python32\lib\urllib\request.py", line 495, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 401: Unauthorized
python拋出一個HTTPError
,但我無法得到http正文。
你是對的,thks! –