if ( contentType != null && checkIfGzipContentType( contentType ) )
dhisHttpResponse = processResponse( requestURL, username, response );
private DhisHttpResponse getDhisHttpResponse( String url, int timeout ) { AvailabilityStatus remoteServerAvailable = synchronizationManager.isRemoteServerAvailable(); if ( !( remoteServerAvailable.isAvailable() ) ) { String message = remoteServerAvailable.getMessage(); log.error( message ); throw new RemoteServerUnavailableException( message ); } String username = metadataSystemSettingService.getRemoteInstanceUserName(); String password = metadataSystemSettingService.getRemoteInstancePassword(); log.info( "Remote server metadata version URL: " + url + ", username: " + username ); DhisHttpResponse dhisHttpResponse = null; try { dhisHttpResponse = HttpUtils.httpGET( url, true, username, password, null, timeout, true ); } catch ( Exception e ) { String message = "Exception occurred while trying to make the GET call to URL: " + url; log.error( message, e ); throw new MetadataVersionServiceException( message, e ); } return dhisHttpResponse; }
dhisHttpResponse = processResponse( requestURL, username, response );
dhisHttpResponse = processResponse( requestURL, username, response );