Skip to content

Do I need to mention the coroutine dispatcher while working with Retrofit? #4023

@VahidGarousi

Description

@VahidGarousi

Type: Question

I'm working with Retrofit and coroutines, and I'm wondering whether I need to explicitly mention the coroutine dispatcher when making network requests. I've read that Retrofit is designed to handle background tasks using coroutines, so I'm not sure if explicitly specifying the dispatcher is necessary.

Can anyone provide clarification on this matter? Is it recommended to specify the coroutine dispatcher when using Retrofit, or is it handled automatically by the library?

I've tried searching for the answer online, but I haven't found a definitive explanation. I'm hoping someone from the Retrofit team or community can shed some light on this issue.

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