title: Stream http response using Microprofile rest client with Quarkus
body: <p>Is it possible to read a response stream using the microprofile rest client?</p>
  <p>I'm attempting to call an api that returns a stream and then parse the stream and emit each item as a Mutiny Multi.</p>
  <p>The rest client</p>
  <pre><code>import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
  import javax.ws.rs.*;
  import javax.rs.core.Response;
  import javax.rs.core.MediaType;
  
  @RegisterRestClient
  public interface MyRemoteService {
  
    @GET
    @Path(&quot;/all&quot;
    @Produces(MediaType.APPLICATION_JSON)
    Response getAllStream()
  }
  </code></pre>
  <p>And the thing that calls it:</p>
  <pre><code>public Multi&lt;MyObject&gt; getAll() {
    return Multi.createFrom().emitter(em -&gt; {
      Response response = myRemoteService.getAllStream();
      InputStream stream = response.readEntity(InputStream.class);
      ...
      // Some logic to parse json into objects
      ...
      em.emit(parsedObject)
      ...
      em.complete()
    }
  }
  
  </code></pre>
  <p>This just calls the endpoint and waits for the full response before then parsing it into individual objects. I can just change the rest client to return a list of objects and I get the same behaviour. Is it possible to get each item as it's streamed rather than just waiting?</p>