title: How can I set default headers for all requests?
body: <p>I have a lot of requests. How can I set default headers for all requests? Please, give me examples</p>
  
  <p>Now My code look like this:</p>
  
  <pre><code>    HttpPost request = new HttpPost(url);
      StringEntity params = null;
      try {
          params = new StringEntity(o.writeValueAsString(auth));
      } catch (UnsupportedEncodingException e) {
          e.printStackTrace();
      }
      request.addHeader("content-type", "application/json");
      request.setEntity(params);
      try {
          client = HttpClientBuilder.create().build();
          HttpResponse response = client.execute(request);  
      } catch (IOException e) {
          e.printStackTrace();
      }
  </code></pre>
  
  <p>So I have many requests like this</p>