title: HttpClient What is the difference between setHeader and addHeader?
body: <p>When using Apache HttpClient version :</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;org.apache.httpcomponents&lt;/groupId&gt;
      &lt;artifactId&gt;httpclient&lt;/artifactId&gt;
      &lt;version&gt;4.5.6&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>What is the difference between setHeader and addHeader?</p>
  
  <pre><code>    httpPost.addHeader("AuthenticationKey",authenticationKey);
      httpPost.addHeader("Content-Type","application/json");
  
      httpPost.setHeader("Cache-Control", "no-cache"); // HTTP 1.1
      httpPost.setHeader("Pragma", "no-cache"); // HTTP 1.0
      httpPost.setHeader("X-Requested-With", "XMLHttpRequest"); // mimics a browser REST request
  </code></pre>