From f9459c2d853d1f90ff3059db26c3c756570c639f Mon Sep 17 00:00:00 2001 From: Timothy Baldridge Date: Fri, 14 Feb 2020 15:27:48 -0700 Subject: [PATCH] Fix disabled test --- Wabbajack.Lib/LibCefHelpers/Init.cs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Wabbajack.Lib/LibCefHelpers/Init.cs b/Wabbajack.Lib/LibCefHelpers/Init.cs index e3b0729a..1f7d8a95 100644 --- a/Wabbajack.Lib/LibCefHelpers/Init.cs +++ b/Wabbajack.Lib/LibCefHelpers/Init.cs @@ -18,13 +18,10 @@ namespace Wabbajack.Lib.LibCefHelpers { public static Common.Http.Client GetClient(IEnumerable cookies, string referer) { - throw new NotImplementedException("tt"); - /* - var container = ToCookieContainer(cookies); - var handler = new HttpClientHandler { CookieContainer = container }; - var client = new HttpClient(handler); - client.DefaultRequestHeaders.Referrer = new Uri(referer); - return client;*/ + var client = new Common.Http.Client(); + client.Headers.Add(("Referrer", referer)); + client.Cookies.AddRange(cookies.Select(cookie => new System.Net.Cookie(cookie.Name, cookie.Value, cookie.Path, cookie.Domain))); + return client; } private static CookieContainer ToCookieContainer(IEnumerable cookies)