if (line.length() != 3) {
throw HTTPResponse::INVALID_HTTP_RESPONSE_CODE;
}
- stringstream ss;
- ss << line; // TODO ver forma mas linda de convertir
- ss >> resp.status_code;
+ to(line, resp.status_code);
is >> static_cast<HTTPMessage&>(resp);
return is;
}