Skip to content

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

Answered by JakeWharton
VahidGarousi asked this question in Q&A
Discussion options

You must be logged in to vote

There is nowhere for you to provide a dispatcher/context and that's by design.

Retrofit supports exposing suspend APIs. Those execute asynchronously in relation to the caller. Where they execute is mostly irrelevant, but it's on the OkHttp Dispatcher which you don't really need to know about.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by VahidGarousi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #4023 on January 01, 2024 03:53.