Example usage for org.apache.commons.httpclient HttpMethod getProxyAuthState

List of usage examples for org.apache.commons.httpclient HttpMethod getProxyAuthState

Introduction

In this page you can find the example usage for org.apache.commons.httpclient HttpMethod getProxyAuthState.

Prototype

public abstract AuthState getProxyAuthState();

Source Link

Usage

From source file:davmail.http.DavGatewayHttpClientFacade.java

private static void resetMethod(HttpMethod method) {
    // reset method state
    method.releaseConnection();// w  w  w.j a va 2s .com
    method.getHostAuthState().invalidate();
    method.getProxyAuthState().invalidate();
}

From source file:com.feilong.tools.net.httpclient3.HttpClientUtil.java

/**
 * ?log.//from ww  w  .ja v a 2s .com
 * 
 * @param httpMethod
 *            the http method
 * @return the http method attribute map for log
 */
private static Map<String, Object> getHttpMethodRequestAttributeMapForLog(HttpMethod httpMethod) {
    Map<String, Object> map = new LinkedHashMap<String, Object>();
    try {
        map.put("httpMethod.getName()", httpMethod.getName());
        map.put("httpMethod.getURI()", httpMethod.getURI().toString());
        map.put("httpMethod.getPath()", httpMethod.getPath());
        map.put("httpMethod.getQueryString()", httpMethod.getQueryString());

        map.put("httpMethod.getRequestHeaders()", httpMethod.getRequestHeaders());

        map.put("httpMethod.getDoAuthentication()", httpMethod.getDoAuthentication());
        map.put("httpMethod.getFollowRedirects()", httpMethod.getFollowRedirects());
        map.put("httpMethod.getHostAuthState()", httpMethod.getHostAuthState().toString());

        // HttpMethodParams httpMethodParams = httpMethod.getParams();
        // map.put("httpMethod.getParams()", httpMethodParams);
        map.put("httpMethod.getProxyAuthState()", httpMethod.getProxyAuthState().toString());

    } catch (Exception e) {
        log.error(e.getClass().getName(), e);
    }
    return map;
}