rsetkus
10/25/2020, 3:13 PMByteReadChannel
and to get a content, I am launching coroutine and converting it to byte array like this:
GlobalScope.launch {
val array = response.content.toByteArray()
}
Wrote a unit test and it is failing because after converting ByteReadChannel, content gets empty. Not quite familiar with a way of reading byte channels so if anybody could point me of how to read response channel, I would much appreciate that.