xxfast
06/21/2022, 2:32 AMAleksei Tirman [JB]
06/21/2022, 10:50 AMsuspend fun main() {
val client = HttpClient(CIO)
<http://client.post|client.post>("<https://httpbin.org/post>") {
delay(123)
header("header", "value")
}
}xxfast
06/21/2022, 11:24 AMHelio
06/21/2022, 11:43 AMloginRepository implementation, it looks like you could perhaps wrap with runBlocking or runCatching in this case?
header(X-User-ID, runBlocking{(loginRepository.last().username)}?
Bear in mind that you should take into account the response time from last() and also make sure that the response is valid.Aleksei Tirman [JB]
06/21/2022, 3:07 PMxxfast
06/22/2022, 3:52 AM