http icon indicating copy to clipboard operation
http copied to clipboard

Clarifications for docs (closing a client)

Open fatadel opened this issue 4 years ago • 2 comments

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:

  1. Should a client be closed and re-opened when the app suspends and resumes respectively?
  2. Or should it be closed only when the app is entirely closed?
  3. If yes to the previous question, should it be done explicitly?

Thank you very much in advance.

fatadel avatar Nov 06 '21 03:11 fatadel

Any update on this?

nichidori avatar Mar 08 '24 04:03 nichidori

I added some more questions here https://github.com/dart-lang/http/issues/422#issuecomment-2158373916

escamoteur avatar Jun 10 '24 13:06 escamoteur