 <p>It was a very silly mistake. The code should be </p> <pre><code>CString strServerName = L"http://localhost"; ............. pFile = pServer-&gt;OpenRequest(CHttpConnection::HTTP_VERB_GET, L"/com.test.simpleServlet/api/customers"); </code></pre>