src/sap.ui.core/src/sap/ui/thirdparty/RequestRecorder.js
function(sLocationUrl) {
			// Try to request the har file from the given location url
			var mHarFileContent = null;
			var oRequest = new XMLHttpRequest();
			oRequest.open("GET", sLocationUrl, false);
			oRequest.addEventListener("load", function() {
				if (this.status === 200) {
					mHarFileContent = JSON.parse(this.responseText);
				}
			});
			oRequest.send();
			try {
				mHarFileContent = JSON.parse(oRequest.responseText);
			} catch (e) {
				throw new Error("Har file could not be loaded.");
			}

			// Validate version of the har file
			if (mHarFileContent && (!mHarFileContent.log || !mHarFileContent.log.version || parseInt(mHarFileContent.log.version, 10) != this.sDefaultMajorHarVersion)) {
				this.oLog.error(sModuleName + " - Incompatible version. Please provide .har file with version " + this.sDefaultMajorHarVersion + ".x");
			}

			return mHarFileContent;
		}
function(sLocationUrl) {
			// Try to request the har file from the given location url
			var mHarFileContent = null;
			var oRequest = new XMLHttpRequest();
			oRequest.open("GET", sLocationUrl, false);
			oRequest.addEventListener("load", function() {
				if (this.status === 200) {
					mHarFileContent = JSON.parse(this.responseText);
				}
			});
			oRequest.send();
			try {
				mHarFileContent = JSON.parse(oRequest.responseText);
			} catch (e) {
				throw new Error("Har file could not be loaded.");
			}

			// Validate version of the har file
			if (mHarFileContent && (!mHarFileContent.log || !mHarFileContent.log.version || parseInt(mHarFileContent.log.version, 10) != this.sDefaultMajorHarVersion)) {
				this.oLog.error(sModuleName + " - Incompatible version. Please provide .har file with version " + this.sDefaultMajorHarVersion + ".x");
			}

			return mHarFileContent;
		}
function ( sLocationUrl ) { // Try to request the har file from the given location url var mHarFileContent = null ; var oRequest = new XMLHttpRequest ( ) ; oRequest . open ( "GET" , sLocationUrl , false ) ; oRequest . addEventListener ( "load" , function ( ) { if ( this . status === 200 ) { mHarFileContent = JSON . parse ( this . responseText ) ; } } ) ; oRequest . send ( ) ; try { mHarFileContent = JSON . parse ( oRequest . responseText ) ; } catch ( e ) { throw new Error ( "Har file could not be loaded." ) ; } // Validate version of the har file if ( mHarFileContent && ( ! mHarFileContent . log || ! mHarFileContent . log . version || parseInt ( mHarFileContent . log . version , 10 ) != this . sDefaultMajorHarVersion ) ) { this . oLog . error ( sModuleName + " - Incompatible version. Please provide .har file with version " + this . sDefaultMajorHarVersion + ".x" ) ; } return mHarFileContent ; }
Tries to load an har file from the given location URL. If no the file could not be loaded, the
function returns null. This is used to determine if the RequestRecorder tries to record instead.

If a har file is loaded, the major version is validated to match the specifications.

@param {string} sLocationUrl The full URL with filename und extension.
@returns {object|null} Har file content as JSON or null if no file is found.
Tries to load an har file from the given location URL . If no the file could not be loaded the function returns null . This is used to determine if the RequestRecorder tries to record instead .