does anyone know if this is the right way to send ...
# android
h
does anyone know if this is the right way to send protobuf message in the payload via Retrofit? https://stackoverflow.com/a/34639315
a
this is offtop here 🙂 btw: public interface ServiceApi { @POST("user/login") Call<ResponseBody> login(@Body Data data); } use a @Body annotation
l
@Hexa Doesn't seem so Kotlin and Android related (so more #random suited), but we can continue in this thread now… There are multiple right ways (including the ones you linked) if you don't have any constraints. Are you looking for something particular?
h
thanks, just wanted to confirm that I can indeed send protobuf message via Retrofit, and what is the best to do it. I know that post is written in Java but I write all my stuff in Kotlin
l
What is best is to use retrofit with coroutines using @gildor's library (until retrofit brings out of the box coroutines support), regardless of the converters.