title: Converting CURL request to HTTP Request Java
body: <p>I have the following CURL request Can anyone please confirm me what would be the subesquest HTTP Request </p>
  
  <pre><code>      curl -u "Login-dummy:password-dummy" -H "X-Requested-With: Curl" "https://qualysapi.qualys.eu/api/2.0/fo/report/?action=list" -k
  </code></pre>
  
  <p>Will it be something like ?</p>
  
  <pre><code>    String url = "https://qualysapi.qualys.eu/api/2.0/fo/report/";
      URL obj = new URL(url);
      HttpURLConnection con = (HttpURLConnection) obj.openConnection();
  
      // optional default is GET
      con.setRequestMethod("GET"); ..... //incomplete
  </code></pre>
  
  <p>Can anyone be kind enough to help me convert the above curl request completely to httpreq.</p>
  
  <p>Thanks in advance.</p>
  
  <p>Suvi</p>