code: protected void setupHTTPRequestHeaderProperties(HTTPRequest httpRequest,HttpMethodBase httpMethodClient)
      {
          //setup header properties
          Properties headerProperties=httpRequest.getHeaderProperties();
          if(headerProperties!=null)
          {
              Iterator<Entry<Object,Object>> iterator=headerProperties.entrySet().iterator();
              Entry<Object,Object> entry=null;
              while(iterator.hasNext())
              {
                  //get next entry
                  entry=iterator.next();
                  
                  //set header values
                  httpMethodClient.addRequestHeader((String)entry.getKey(),(String)entry.getValue());
              }
          }
      }
docs: This function sets the header properties in the HTTP method.
  
  @param   httpRequest
  The HTTP request
  @param   httpMethodClient
  The apache HTTP method