In what cases should Internet connections be checked?
Marcee last edited by
I write the REST API app and, at every request to the server, first check the Internet connections, and only in case of a positive result, send a request to the server.
Is that right? Or in what cases do you need to check?
Well, when it's right to check the internet connection, it's pretty controversial. We're in company mostly if we check the connection, only when the application is launched to inform the user that without the Internet, the application will not work. If the internet breaks after the application has been opened, then it is simple to process the errors of compliance and to remove the relevant notices to the user or to replace the next sign of the attachment.
It's pointless to check at every request, because the Internet may be missing after testing, but before the request is completed. And the fact that the test has generally failed to guarantee that the Internet is indeed, can be connected to any gulom and passes, and until your REST server does not reach.