[ENHANCEMENT]ReceiveChannel or produce-consume pattern
Closed this issue · 1 comments
XinyueZ commented
I'd like the style
interface MyService {
@GET("/user")
fun getUser(): ReceiveChannel<Response<User>>
}
getUser().consume { user ->
print(user.body)
}
Maybe it could be another alternative to the return value.
JakeWharton commented
Since HTTP requests have a single return value I don't see any value in providing this over Deferred<T>
and the use of await()
.