<commit_before>﻿using System.IO;
using System.Net;

namespace Crepido.ElmahOfflineViewer.Core.Infrastructure.Web
{
    using System;

    public class WebRequestHelper : IWebRequestHelper
	{
		public string Uri(Uri url)
		{
			string result;

			using (var client = new WebClient())
			{
				var response = client.OpenRead(url);

				using (var reader = new StreamReader(response))
				{
					result = reader.ReadToEnd();
				}
			}

			return result;
		}
	}
}<commit_msg>TODO comments for review of WebRequestHelper<commit_after>﻿using System;
using System.IO;
using System.Net;

namespace Crepido.ElmahOfflineViewer.Core.Infrastructure.Web
{
	public class WebRequestHelper : IWebRequestHelper
	{
		public string Uri(Uri url)
		{
			string result;

			using (var client = new WebClient())
			{
				var response = client.OpenRead(url);
				// TODO Check content-type is the expected one!
				// TODO Use charset in response Content-Type header
				using (var reader = new StreamReader(response))
				{
					result = reader.ReadToEnd();
				}
			}

			return result;
		}
	}
}
{'fraction_non_alphanumeric': 0.09590316573556797, 'fraction_numerical': 0.0, 'mean_word_length': 3.215686274509804, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3022688', 'n_tokens_mistral': 408, 'n_tokens_neox': 333, 'n_words': 89}