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
+3 -3
View File
@@ -109,7 +109,7 @@ namespace Managers
if (flag.size() > 3 || isNumber(flag))
{
flg.value = flag;
cout<<"flag value "<<flg.value<<endl;
//cout<<"flag value "<<flg.value<<endl;
flags.push_back(flg);
flg = Flags{};
continue;
@@ -121,7 +121,7 @@ namespace Managers
return !val.compare(flag);
}))
{
cout<<"flag "<<flag<<endl;
//cout<<"flag "<<flag<<endl;
flg.flag = flag;
}
else
@@ -140,7 +140,7 @@ namespace Managers
for (auto i = 2; true; ++i)
{
string val{*(params + i)};
cout<<"Parsed flag "<<val<<endl;
//cout<<"Parsed flag "<<val<<endl;
parsed.push_back(val);
}
}
+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;
}