Skip to content

Best practices on if and when you should close HTTP connections in flutter apps? #422

Description

@yahya-uddin

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions