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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user