Yes, you can use the @Streaming annotation available from version 1.6.0. Make sure you are using this version.
As pointed out in changelog : New: @Streaming on the Response will skip body buffering to byte [] before delivery.
interface Api { @Get("path/to/your/resource") @Streaming Response getData(); }
Then you should be able to directly pass from InputStream
Response response = api.getData() InputStream is = response.getBody().in(); // stream your data directly from the InputStream!
Keep in mind that my example is synchronous for simplicity.
Miguel lavigne
source share