<commit_before>﻿using System;
using System.Windows;
using MahApps.Metro.Controls;
using System.Reflection;
using System.Windows.Controls;
using System.Text;

namespace RestTester
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary> 
    public partial class MainWindow : MetroWindow
    {
        ViewModel.MainViewModel vm;
        ThemeWindow themeWindow;
        CredentialsWindow credWindow;
        HeadersWindow headersWindow;
        public MainWindow()
        {
            vm = new ViewModel.MainViewModel();
            this.DataContext = vm;
            
            vm.RequestPosted += new EventHandler(delegate (object o, EventArgs e)
            {
                this.Dispatcher.Invoke((Action)(() =>
                {
                    if (vm.Response != null && vm.Response != "")
                    {
                        HideScriptErrors(this.WebBrowserView, true);
                        WebBrowserView.NavigateToString(vm.Response.ToString());
                    }
                }));
            });<commit_msg>adding ignore for self-signed certificates for dev environments<commit_after>﻿using System;
using System.Windows;
using MahApps.Metro.Controls;
using System.Reflection;
using System.Windows.Controls;
using System.Text;
using System.Net;

namespace RestTester
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary> 
    public partial class MainWindow : MetroWindow
    {
        ViewModel.MainViewModel vm;
        ThemeWindow themeWindow;
        CredentialsWindow credWindow;
        HeadersWindow headersWindow;
        public MainWindow()
        {
            vm = new ViewModel.MainViewModel();
            this.DataContext = vm;
            
            vm.RequestPosted += new EventHandler(delegate (object o, EventArgs e)
            {
                this.Dispatcher.Invoke((Action)(() =>
                {
                    if (vm.Response != null && vm.Response != "")
                    {
                        HideScriptErrors(this.WebBrowserView, true);
                        WebBrowserView.NavigateToString(vm.Response.ToString());
                    }
                }));
            });
            ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
{'fraction_non_alphanumeric': 0.0937365010799136, 'fraction_numerical': 0.0, 'mean_word_length': 1.7571428571428571, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '2108015', 'n_tokens_mistral': 568, 'n_tokens_neox': 532, 'n_words': 123}