class IngestInternalClientRest extends DefaultClient implements IngestInternalClient {

    @Override
    public Response downloadObjectAsync(String objectId, IngestCollection type)
        throws InvalidParseOperationException, IngestInternalClientServerException,
        IngestInternalClientNotFoundException {

        ParametersChecker.checkParameter(BLANK_OBJECT_ID, objectId);
        ParametersChecker.checkParameter(BLANK_TYPE, type);

        Response response = null;
        try {
            response = make(get()
                .withPath(INGEST_URL + "/" + objectId + "/" + type.getCollectionName())
                .withOctetAccept());
            check(response);
            return response;
        } catch (VitamClientException | WorkspaceClientServerException | NotAcceptableClientException e) {
            throw new IngestInternalClientServerException(e);
        } catch (IngestInternalClientNotFoundException e) {
            throw new IngestInternalClientNotFoundException(e);
        } finally {
            if (Status.fromStatusCode(response.getStatus()).getFamily() != SUCCESSFUL) {
                response.close();
            }
        }


    }

      IngestInternalClientRest(IngestInternalClientFactory factory);

}