Authorization HTTP header was missing from the download request
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user