mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-24 06:56:27 +00:00
Removed Header overflow
This commit is contained in:
parent
1f359dfa74
commit
bf0db02e91
@ -345,8 +345,8 @@ namespace SpotifyAPI.SpotifyWebAPI
|
||||
{
|
||||
if (!UseAuth)
|
||||
throw new Exception("UseAuth required for 'UploadData'");
|
||||
webclient.Headers.Add("Authorization", TokenType + " " + AccessToken);
|
||||
webclient.Headers.Add("Content-Type", "application/json");
|
||||
webclient.Headers.Set("Authorization", TokenType + " " + AccessToken);
|
||||
webclient.Headers.Set("Content-Type", "application/json");
|
||||
String response = "";
|
||||
try
|
||||
{
|
||||
@ -367,7 +367,9 @@ namespace SpotifyAPI.SpotifyWebAPI
|
||||
public String DownloadString(String url)
|
||||
{
|
||||
if (UseAuth)
|
||||
webclient.Headers.Add("Authorization", TokenType + " " + AccessToken);
|
||||
webclient.Headers.Set("Authorization", TokenType + " " + AccessToken);
|
||||
else if (!UseAuth && webclient.Headers["Authorization"] != null)
|
||||
webclient.Headers.Remove("Authorization");
|
||||
String response = "";
|
||||
try
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user