title: connection.setRequestProperty and excplicitly writing to the urloutputstream are they same?
body: <pre><code>URL url = new URL("http://www.example.com/comment");
  HttpURLConnection connection = (HttpURLConnection) url.openConnection();
  connection.setDoOutput(true);
  connection.setRequestMethod("POST");
  </code></pre>
  
  <p>Is </p>
  
  <pre><code>connection.setRequestProperty(key, value);
  </code></pre>
  
  <p>the same as </p>
  
  <pre><code>OutputStreamWriter writer = new OutputStreamWriter(connection.getOutputStream());
  writer.write("key=" + value);
  writer.close();
  </code></pre>
  
  <p>?</p>
  
  <p>If not, please correct me.</p>