What I'm trying to do is to get List<byte[]>
from InputStream
. I'm sending HTTP request to an API that returns List<byte[]>
and I want to get that list from the content body.
HttpPost httpPost = new HttpPost(endPoint);
CloseableHttpClient httpclient = HttpClients.createDefault();
httpPost.setEntity(new ByteArrayEntity(ReqBody));
CloseableHttpResponse response = httpclient.execute(httpPost);
System.out.println(response.getStatusLine());
System.out.println(response.getEntity().getContentType());
return response.getEntity().getContent();