Fixed issue where if / was not provided in the host value then it would not send the request. Fixed issue where song records are formatted correctly

This commit is contained in:
kdeng00
2019-08-01 20:55:09 -04:00
parent f81b481f38
commit 98748b383c
5 changed files with 40 additions and 46 deletions
+1 -3
View File
@@ -40,7 +40,6 @@ namespace Managers
usrObj["username"] = user.username;
usrObj["password"] = user.password;
cout<<user.username<<" "<<user.password<<endl;
cout<<"Sending request for token"<<endl;
auto url = api.url + api.endpoint;
@@ -49,12 +48,11 @@ namespace Managers
cpr::Body{usrObj.dump()},
cpr::Header{{"Content-Type", "application/json"}});
cout<<r.text<<endl;
json res = json::parse(r.text);
token.accessToken = res["token"];
token.tokenType = res["token_type"];
//cout<<"status code "<<r.status_code<<endl;
cout<<"status code "<<r.status_code<<endl;
return token;
}