for nullable types we'll need to create a proper function outside the template for them

This commit is contained in:
DarthArgus
2016-09-26 06:24:21 +00:00
parent 51fa1ff6ad
commit dd9417642c
4 changed files with 24 additions and 11 deletions
+10
View File
@@ -50,6 +50,16 @@ bool webAPI::setData(std::string &data)
return false;
}
std::string webAPI::getString(const std::string &slot)
{
if (!this->responseData.empty() && !slot.empty() && responseData.count(slot))
{
return this->responseData[slot].get<std::string>();
}
return std::string("");
}
bool webAPI::submit(const int &reqType, const int &getPost, const int &respType)
{
if (reqType == DTYPE::JSON) // json request