I'm using OkHttp's Call#enqueue
to issue a couple dozen HTTP requests in parallel. In my callback, I'm given an Response
with a ResponseBody
. Because I have several requests in flight, I'd like to read data from the ResponseBody
's source()
without blocking. Is there some way to do that?
For example, if suppose there are 324 bytes available in a given ResponseBody
, is there some way to read those bytes and then wait asynchronously for more data to be available (potentially reading data from other ResponseBody
objects for other in-flight requests in the interim)?