Browse Source

better status handling (if timeout)

master
Odilitime 5 years ago
parent
commit
5093a6346d
  1. 5
      src/networking/HTTPResponse.cpp

5
src/networking/HTTPResponse.cpp

@ -34,6 +34,9 @@ HTTPResponse::HTTPResponse(const std::string &rawResponse) { @@ -34,6 +34,9 @@ HTTPResponse::HTTPResponse(const std::string &rawResponse) {
}
body = rawResponse.substr(cursor, rawResponse.length() - cursor - 1);
//std::cout << "Body is [" << body << "]" << std::endl;
statusCode = stoi(status);
statusCode = 0;
if (status != "") { // if timeout?
statusCode = stoi(status);
}
std::cout << "HTTPResponse::HTTPResponse - Status is " << status << std::endl;
}

Loading…
Cancel
Save