From d58ebd100f8b74802ee3cf6db292dde86c0c5067 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Tue, 28 Feb 2017 14:42:26 +0100 Subject: [PATCH] Fixed ~ani and ~mang, searches might be off for some time --- .../Searches/Commands/AnimeSearchCommands.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/NadekoBot/Modules/Searches/Commands/AnimeSearchCommands.cs b/src/NadekoBot/Modules/Searches/Commands/AnimeSearchCommands.cs index 9fdf07f0..3fcfb654 100644 --- a/src/NadekoBot/Modules/Searches/Commands/AnimeSearchCommands.cs +++ b/src/NadekoBot/Modules/Searches/Commands/AnimeSearchCommands.cs @@ -30,17 +30,19 @@ namespace NadekoBot.Modules.Searches { try { - var headers = new Dictionary { - {"grant_type", "client_credentials"}, - {"client_id", "kwoth-w0ki9"}, - {"client_secret", "Qd6j4FIAi1ZK6Pc7N7V4Z"}, - }; + var headers = new Dictionary + { + {"grant_type", "client_credentials"}, + {"client_id", "kwoth-w0ki9"}, + {"client_secret", "Qd6j4FIAi1ZK6Pc7N7V4Z"}, + }; using (var http = new HttpClient()) { - http.AddFakeHeaders(); + //http.AddFakeHeaders(); + http.DefaultRequestHeaders.Clear(); var formContent = new FormUrlEncodedContent(headers); - var response = await http.PostAsync("http://anilist.co/api/auth/access_token", formContent).ConfigureAwait(false); + var response = await http.PostAsync("https://anilist.co/api/auth/access_token", formContent).ConfigureAwait(false); var stringContent = await response.Content.ReadAsStringAsync().ConfigureAwait(false); anilistToken = JObject.Parse(stringContent)["access_token"].ToString(); }