Issue
Hi all I have question is retrofit post data to api in background thread automatically or should I use something like RXjava to make it?
Solution
Retrofit by default doesn't run network requests on main thread (if thats what you need to know), so you don't really need to do anything in that regard.
but if you are using Kotlin, i would highly suggest you to use Retrofit with Coroutines, which is not mandatory for kotlin applications but it is more efficient and is built in kotlin itself so you don't need to install any third party lib.
here is a useful guide on how to use Retrofit with Coroutines: link
Answered By - Bilal Awwad
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.