From 1af1d37a35ddefe512d1742d414d316fe51d7811 Mon Sep 17 00:00:00 2001 From: Jonas Dellinger Date: Sun, 3 Sep 2017 14:46:25 +0200 Subject: [PATCH] Moved Encoding to ExtendedWebClient --- SpotifyAPI/Local/ExtendedWebClient.cs | 3 ++- SpotifyAPI/Local/RemoteHandler.cs | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SpotifyAPI/Local/ExtendedWebClient.cs b/SpotifyAPI/Local/ExtendedWebClient.cs index 83a7f214..e1ca9f85 100644 --- a/SpotifyAPI/Local/ExtendedWebClient.cs +++ b/SpotifyAPI/Local/ExtendedWebClient.cs @@ -1,5 +1,6 @@ using System; using System.Net; +using System.Text; namespace SpotifyAPI.Local { @@ -11,7 +12,7 @@ namespace SpotifyAPI.Local { // TODO Remove once SSL Issues are resolved #115 ServicePointManager.ServerCertificateValidationCallback = (s, certificate, chain, sslPolicyErrors) => true; - + Encoding = Encoding.UTF8; Timeout = 2000; Headers.Add("Origin", "https://embed.spotify.com"); Headers.Add("Referer", "https://embed.spotify.com/?uri=spotify:track:5Zp4SWOpbuOdnsxLqwgutt"); diff --git a/SpotifyAPI/Local/RemoteHandler.cs b/SpotifyAPI/Local/RemoteHandler.cs index 6a56d47c..1e627466 100644 --- a/SpotifyAPI/Local/RemoteHandler.cs +++ b/SpotifyAPI/Local/RemoteHandler.cs @@ -114,7 +114,6 @@ namespace SpotifyAPI.Local { if (SpotifyLocalAPI.IsSpotifyRunning()) { - wc.Encoding = Encoding.UTF8; response = "[ " + wc.DownloadString(address) + " ]"; } }