Code example for HttpMessage

Methods: addHeader

0
    method.setEntity(entity);
    return execGenericMethod(username, password, uri, method);
  } 
 
  private void setMethodHeaders(HttpMessage method) {
    method.addHeader("Pragma","no-cache");
    method.addHeader("Cache-Control","no-cache");
  } 
 
  private WeaveResponse execGenericMethod(String username, String password, URI uri, HttpRequestBase method)
      throws IOException, WeaveException { 
    HttpClient client = null;
    try { 
      client = createHttpClient(username, password);
      return execGenericMethod(client, uri, method);
//    } catch (IOException e) { 
//      throw new WeaveException("Unable to communicate with Weave server.", e); 
    } finally { 
      if (m_clientConMgr == null && client != null) {
        client.getConnectionManager().shutdown();
      }