What happens when response fails to reach the clie

2019-05-04 19:34发布

This explains how token authentication works in rails when this lib is used. enter image description here

But, if this (as shown in image below) happens, should I sign-in again to get a new valid token that can be used for the next request? This doesn't seem so good as network failure might often happen; isn't there a simple "RETRY" way?

enter image description here

EDIT: The server would accept the retry request, if it reaches within 5 seconds since the previous one, essentially treating it as a batch request. However, this wouldn't help solve my problem.

0条回答
登录 后发表回答