function SimpleResponse(xhr, PromiseImpl) {
		var headers = parseHeaders(xhr.getAllResponseHeaders());
		Object.defineProperties(this, {
			headers: {
				value: headers
			},
			ok: {
				value: xhr.status >= 200 && xhr.status < 300
			},
			status: {
				value: xhr.status
			},
			statusText: {
				value: xhr.statusText
			}
		});

		this.json = function() {
			if (xhr.responseType === "json") {
				return PromiseImpl.resolve(xhr.response);
			} else {
				try {
					var oData = JSON.parse(xhr.responseText);
					return PromiseImpl.resolve(oData);
				} catch (err) {
					return PromiseImpl.reject(err);
				}
			}
		};

		this.text = function() {
			return PromiseImpl.resolve(xhr.responseText);
		};
	}
Represents the response object to a {@link module:sap/base/util/fetch} request and {@link module:sap/base/util/syncFetch} request.
The implementation is based on the Response interface of the global <code>fetch()</code> method,
but brings a much reduced set of properties and methods.

The properties that are provided:
<ul>
	<li>The <code>headers</code> property containing the <code>Headers</code> object</li>
	<li>The <code>ok</code> property containing a boolean stating whether the response was successful</li>
	<li>The <code>status</code> property containing the HTTP status code</li>
	<li>The <code>statusText</code> property containing an HTTP status message</li>
</ul>

The methods that are provided:
<ul>
	<li>The <code>json()</code> method returns a promise that resolves with the result of parsing the XHR response text as JSON</li>
	<li>The <code>text()</code> method returns a promise that resolves with the XHR response text as String</li>
</ul>

In case of a response to a synchronous <code>module:sap/base/util/syncFetch</code> request,
all methods will return the XHR response directly, according to the respective output format.


@param {XMLHttpRequest} xhr The XMLHttpRequest object
@param {Promise|sap.ui.base.SyncPromise} PromiseImpl A Promise for asynchronous requests, and
                                         an <code>sap.ui.base.SyncPromise</code> for synchronous requests.
@interface
@alias module:sap/base/util/SimpleResponse
@private
@ui5-restricted SAPUI5 Distribution Layer Libraries