We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
目前為避免post /answer API時,user token 是過期的,所以目前在post /answer API前,都會先post /user API,以取得最新的user token。 好處是user token一定不會過期,但壞處不論user token有沒有過期,都會重新打一次 /user API,是不是有更好的方法? 我目前是想說,使用try...catch,如果post /answer API 時回傳401,才去重新取得user token。
/answer
user token
/user
try...catch
The text was updated successfully, but these errors were encountered:
dyfu95
No branches or pull requests
目前為避免post
/answer
API時,user token
是過期的,所以目前在post/answer
API前,都會先post/user
API,以取得最新的user token。好處是user token一定不會過期,但壞處不論user token有沒有過期,都會重新打一次
/user
API,是不是有更好的方法?我目前是想說,使用
try...catch
,如果post/answer
API 時回傳401,才去重新取得user token。The text was updated successfully, but these errors were encountered: