//SUSPEND CHECKSTYLE CHECK VisibilityModifierCheck
private String sendInstanceRequest(Instances instances, String type,
String entity, String start, String end, InputStream props,
String runid, String colo) throws FalconCLIException {
WebResource resource = service.path(instances.path).path(type)
.path(entity);
if (start != null) {
resource = resource.queryParam("start", start);
}
if (end != null) {
resource = resource.queryParam("end", end);
}
if (runid != null) {
resource = resource.queryParam("runid", runid);
}
if (colo != null) {
resource = resource.queryParam("colo", colo);
}
ClientResponse clientResponse;
if (props == null) {
clientResponse = resource.header(REMOTE_USER, USER)
.accept(instances.mimeType)
.method(instances.method, ClientResponse.class);
} else {
clientResponse = resource.header(REMOTE_USER, USER)
.accept(instances.mimeType)
.method(instances.method, ClientResponse.class, props);
}
checkIfSuccessfull(clientResponse);