According to the docs it says:
If you're making multiple requests to the same server, you can keep open a persistent connection by using a Client rather than making one-off requests. If you do this, make sure to close the client when you're done:
However, in most mobile apps, you tend to send most requests to a single server.
Does that mean, for an app that does a lot of API calls to a server, that we should keep the connection up throughout the app lifetime?
Also should we close and re-open the connection when the app suspends and resume states?
According to the docs it says:
However, in most mobile apps, you tend to send most requests to a single server.
Does that mean, for an app that does a lot of API calls to a server, that we should keep the connection up throughout the app lifetime?
Also should we close and re-open the connection when the app suspends and resume states?