Hello, I am trying make a hello world program wich prints in a web browser the message "Hello World" but I'm not understand how to do this. Someone can help me?
I'm try make a server, when I open the URL in web browser, the server will respond with the message. The code I used was for the server is:
I'm try make a server, when I open the URL in web browser, the server will respond with the message. The code I used was for the server is:
#include "stdafx.h"
#include <cpprest\http_client.h>
#include<cpprest\http_listener.h>
#include <iostream>
using namespace web::http::experimental::listener;
using namespace web::http;
using namespace web;
int main(int argc, char* argv[]){
http_listener listener(U("http://localhost:1234/"));
listener.open().wait();
listener.support(methods::GET, [](http_request request){
request.reply(http::status_codes::OK, U("Hello World!"));
});
listener.close();
return 0;
}