Added EE::Network module.

This commit is contained in:
Martín Lucas Golini
2013-09-28 04:23:59 -03:00
parent 2a3dcdcb69
commit 390ebfd6fa
40 changed files with 4532 additions and 176 deletions

View File

@@ -0,0 +1,28 @@
#include <eepp/ee.hpp>
/// Entry point of application
EE_MAIN_FUNC int main (int argc, char * argv [])
{
// Create a new HTTP client
cHttp http;
// We'll work on http://www.wikipedia.org
http.SetHost("http://www.wikipedia.org");
// Prepare a request to get the '/' page
cHttp::Request request("/");
// Send the request
cHttp::Response response = http.SendRequest(request);
// Check the status code and display the result
cHttp::Response::Status status = response.GetStatus();
if ( status == cHttp::Response::Ok ) {
std::cout << response.GetBody() << std::endl;
} else {
std::cout << "Error " << status << std::endl;
}
return EXIT_SUCCESS;
}