getHeadersFromResponse = (expectedResponseHeaders, response) => {
	const responseHeaders = [];

	if (expectedResponseHeaders) {
		for (const header of expectedResponseHeaders) {
			const headerValue = response.headers.get(header);
			responseHeaders.push({ name: header, value: headerValue });
		}
	}

	return responseHeaders;
}
Gets the values for the expected headers from the response.
@param {Array.<string>} expectedResponseHeaders the expected HTTP headers to receive
@param {Response} response the HTTP response
@returns {string} to be used as the expected HTTP-headers component in CORS URL.