src/vs/platform/userDataSync/common/userDataSyncStoreService.ts/UserDataSyncStoreClient/read
class UserDataSyncStoreClient:	async read(resource: ServerResource, oldValue: IUserData | null, headers: IHeaders = {}): Promise<IUserData> {
		if (!this.userDataSyncStoreUrl) {
			throw new Error('No settings sync store url configured.');
		}

		const url = joinPath(this.userDataSyncStoreUrl, 'resource', resource, 'latest').toString();
		headers = { ...headers };
		// Disable caching as they are cached by synchronisers
		headers['Cache-Control'] = 'no-cache';
		if (oldValue) {
			headers['If-None-Match'] = oldValue.ref;
		}

		const context = await this.request(url, { type: 'GET', headers }, [304], CancellationToken.None);

		let userData: IUserData | null = null;
		if (context.res.statusCode === 304) {
			userData = oldValue;
		}

		if (userData === null) {
			const ref = context.res.headers['etag'];
			if (!ref) {
				throw new UserDataSyncStoreError('Server did not return the ref', url, UserDataSyncErrorCode.NoRef, context.res.statusCode, context.res.headers[HEADER_OPERATION_ID]);
			}

			const content = await asTextOrError(context);
			if (!content && context.res.statusCode === 304) {
				throw new UserDataSyncStoreError('Empty response', url, UserDataSyncErrorCode.EmptyResponse, context.res.statusCode, context.res.headers[HEADER_OPERATION_ID]);
			}

			userData = { ref, content };
		}

		return userData;
	}