http://www.sfml-dev.org/tutorials/2.1/network-http-fr.phpParagraphe "Les réponses" :
sf::Http::Response response = http.sendRequest(request);
std::cout << "status: " << response.getStatus() << std::endl;
std::cout << "HTTP version: " << response.getMajorHttpVersion() << "." << response.getMinorHttpVersion() << std::endl;
std::cout << "Content-Type header:" << response.getField("Content-Type") << std::endl;
std::cout << "body: " << response.getStatus() << std::endl;
il est écrit std::cout << body: ... response.getStatus() au lieu de response.getBody()
Bon code :
sf::Http::Response response = http.sendRequest(request);
std::cout << "status: " << response.getStatus() << std::endl;
std::cout << "HTTP version: " << response.getMajorHttpVersion() << "." << response.getMinorHttpVersion() << std::endl;
std::cout << "Content-Type header:" << response.getField("Content-Type") << std::endl;
std::cout << "body: " << response.getBody() << std::endl;
Erreur insignifiante, mais si ça peut éviter à quelqu'un d'autre de perdre 5 minutes ...