async _apiRequest(httpMethod, iface, method, version, data, cacheSeconds) {
		data = data || {};
		httpMethod = httpMethod.toUpperCase(); // just in case

		// Pad the version with zeroes to make it 4 digits long, because Valve
		version = version.toString();
		while (version.length < 4) {
			version = '0' + version;
		}

		data.format = 'vdf'; // for parity with the Steam client

		let client = this._httpClient || new HttpClient({
			userAgent: USER_AGENT,
			httpsAgent: this._getProxyAgent(),
			localAddress: this.options.localAddress,
			defaultHeaders: Object.assign(getDefaultHeaders(), this.options.additionalHeaders),
			defaultTimeout: 5000,
			gzip: true
		});
		this._httpClient = client;

		let url = `https://${HOSTNAME}/${iface}/${method}/v${version}/`;

		let cacheKey = `API_${httpMethod}_${url}`;
		let cacheValue;
		if (cacheSeconds && (cacheValue = this._ttlCache.get(cacheKey))) {
			this.emit('debug', `[WebAPI] Using cached value for ${cacheKey}`);
			return cacheValue;
		}

		let headers = {};
		let body = null;
		if (httpMethod == 'GET') {
			url += `?${buildQueryString(data)}`;
		} else {
			headers['Content-Type'] = 'application/x-www-form-urlencoded';
			body = buildQueryString(data);
		}

		let res = await client.request({
			method: httpMethod,
			url,
			body
		});

		this.emit('debug', `API ${httpMethod} request to ${url}: ${res.statusCode}`);

		if (res.statusCode != 200) {
			throw new Error(`HTTP error ${res.statusCode}`);
		}

		let responseData = VDF.parse(res.textBody);

		if (cacheSeconds) {
			this._ttlCache.add(cacheKey, responseData, 1000 * cacheSeconds);
		}

		return responseData;
	}
@param {string} httpMethod
@param {string} iface
@param {string} method
@param {number} version
@param {object} [data]
@param {number} [cacheSeconds]
@returns {Promise}
@protected