Authorization HTTP header was missing from the download request

This commit is contained in:
kdeng00
2019-10-24 22:07:09 -04:00
parent 81892cc52e
commit f4845d70ec
+3 -5
View File
@@ -42,12 +42,10 @@ namespace Syncers
cout<<"song path "<<song.songPath<<endl; cout<<"song path "<<song.songPath<<endl;
string auth{token.tokenType}; string auth{token.tokenType};
auth.append(" " + token.accessToken); auth.append(" " + token.accessToken);
/**
auto r = cpr::Get(cpr::Url(url), auto r = cpr::Get(cpr::Url(url),
cpr::Header{{"authorization", auth}}); cpr::Header{{"Content-type", "audio/mpeg"},
*/ {"Authorization", auth}});
auto r = cpr::Get(cpr::Url(url),
cpr::Header{{"Content-type", "audio/mpeg"}});
int statusCode = r.status_code; int statusCode = r.status_code;