I know you can check for an internet connection, but you could check if my application is connected to the API where both are on the local network.
For example, if a problem occurs on the network and the application can not communicate with the API, a message would appear informing the user about the situation.
What would be the steps to get this result?