async fetchData (url, type = "json", requestHeaders = undefined, expectedResponseHeaders = undefined) {
		const mockData = this.config.mockData;
		if (mockData) {
			const data = mockData.substring(1, mockData.length - 1);
			return JSON.parse(data);
		}
		const useCorsProxy = typeof this.config.useCorsProxy !== "undefined" && this.config.useCorsProxy;
		return performWebRequest(url, type, useCorsProxy, requestHeaders, expectedResponseHeaders, config.basePath);
	}
A convenience function to make requests.
@param {string} url the url to fetch from
@param {string} type what contenttype to expect in the response, can be "json" or "xml"
@param {Array.<{name: string, value:string}>} requestHeaders the HTTP headers to send
@param {Array.<string>} expectedResponseHeaders the expected HTTP headers to recieve
@returns {Promise} resolved when the fetch is done