title: C++ REST SDK Casablanca Client.request
body: <p>I want to write a little c++ program that sends a request to a server an get some data. I found the C++ Rest-SDK and decided to use it. I searched on different websites for code-examples but many of them doesn't work an shows syntax errors. What i got now is that code but the client.request method is skipped. The program never jumps in. Hope someone can realise the problem and maybe explain what i have to change. </p>
  
  <pre><code>#include &lt;Windows.h&gt;
  #include &lt;iostream&gt;
  #include &lt;sstream&gt;
  #include &lt;string&gt;
  #include "cpprest/containerstream.h"
  #include "cpprest/filestream.h"
  #include "cpprest/http_client.h"
  #include "cpprest/json.h"
  #include "cpprest/producerconsumerstream.h"
  #include "cpprest/http_client.h"
  #include &lt;string.h&gt;
  #include &lt;conio.h&gt;
  
  using namespace std;
  using namespace web;
  using namespace web::json;
  using namespace web::http;
  using namespace web::http::client;
  using namespace utility;
  using namespace utility::conversions;
  
  
  int main() {
  
    http_client client(L"http://httpbin.org/ip");
  
    client.request(methods::GET).then([](http_response response)
    { 
      if(response.status_code() == status_codes::OK)
      {
        auto body = response.extract_string().get();    
        std::wcout &lt;&lt; body;
        getch();
      }
    });
  
  
    return 0;
  }
  </code></pre>