title: Add HEADER in HTTP Request in Java
body: <p>I'm using this following code to send simple HTTP Request :</p>
  <pre><code>try
  {
      Socket  s = new Socket ();
      s.bind    (new InetSocketAddress (ipFrom, 0));
      s.connect (new InetSocketAddress (ipTo,   80), 1000);
  
      PrintWriter     writer = new PrintWriter    (s.getOutputStream ());
      BufferedReader  reader = new BufferedReader (new InputStreamReader (s.getInputStream ()));
  
      writer.print (&quot;GET &quot; + szUrl + &quot; HTTP/1.0\r\n\r\n&quot;); 
      writer.flush ();
  
      s     .close ();
      reader.close ();
      writer.close ();
  }
  </code></pre>
  <p>However, as you can see, I don't send a custom HEADER.
  What should I add to send a custom HEADER ?</p>