http
http copied to clipboard
Clarifications for docs (closing a client)
Sorry for that but I am explicitly duplicating the issue (https://github.com/dart-lang/http/issues/422) since it is indeed very important from my perspective but still has not got any response from the package maintainers since May 2020.
Just to recap:
The documentation states
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, it is not clear when and how to close a client. Specifically:
- Should a client be closed and re-opened when the app suspends and resumes respectively?
- Or should it be closed only when the app is entirely closed?
- If yes to the previous question, should it be done explicitly?
Thank you very much in advance.
Any update on this?
I added some more questions here https://github.com/dart-lang/http/issues/422#issuecomment-2158373916