Regarding http_listener

Sep 18, 2015 at 4:23 PM
Hi,
I have create a helloworld rest API --
http_listener listener("http://localhost:8000/render");
listener.support(methods::GET, handle_get);
try
{
    listener
    .open()
    .then([&listener](){TRACE("\nstarting to listen\n");})
    .wait();

    while (true);
}
catch (exception const & e)
{
    wcout << e.what() << endl;
}

After runnign this app if hit http://localhost:8000/render i get the expected result.
But when i try http://127.0.0.1:8000/render or http://192.168.1.11/render the api doesnt get called.
On my local system localhost / 127.0.0.1 / 192.168.1.11 all should resolve to same endpoint right ? i dont face similar issue if i create api using some other language (nodejs for instance ).

What i am doing wrong here ?
Coordinator
Sep 19, 2015 at 12:13 AM
Hey Gaurav

Could you try using * as the hostname, as in:
http://*:8000/ Thanks Kavya.
Marked as answer by kavyako on 9/21/2015 at 4:04 PM
Sep 21, 2015 at 11:40 PM
Thanks it works now.