Home > Mobile >  Okhttp request, local server closed, but the return code is 200
Okhttp request, local server closed, but the return code is 200

Time:01-29

To do the server is shut down using a cache data, but can't find the conditions to judge, code is 200, please!

CodePudding user response:

Code not as a standard of request is successful, you need to use the content of the response to fill in your own protocol parameters to judge whether the request is successful, server code it will only be correct response to your request, do not tell your server-side code is executed correctly

CodePudding user response:

Off the server can return 200, explain okhttp cache, remove the caching strategies

CodePudding user response:

refer to the second floor program cat King reply:
off the server can return 200, suggests a cache the okhttp, remove the caching policy
cache can't go, because is to be closed when the server with the cached data

CodePudding user response:

reference 1st floor 灬 next _ deduce response:
code can not as a standard of request is successful, you need to use the response of the content to fill in your own protocol parameters to judge whether the request is successful, the server code it will only be correct response to your request, do not tell you the server code was executed correctly
is there a way to inside the interceptor implementation
  • Related