Examples of HttpMethodParams


Examples of org.apache.commons.httpclient.params.HttpMethodParams

    } else {
      httpMethod = new GenericMethod(method);
    }

    httpMethod.setURI(uri);
    HttpMethodParams httpParams = httpMethod.getParams();
    // default to use HTTP 1.0
    httpParams.setVersion(HttpVersion.HTTP_1_0);
    if (version.equalsIgnoreCase(HttpHeader.HTTP11)) {
      httpParams.setVersion(HttpVersion.HTTP_1_1);
    }

    // set various headers
    int pos = 0;
    Pattern pattern = null;
View Full Code Here

Examples of org.apache.commons.httpclient.params.HttpMethodParams

        getResponseTrailerHeaderGroup().clear();
        statusLine = null;
        effectiveVersion = null;
        aborted = false;
        used = false;
        params = new HttpMethodParams();
        responseBody = null;
        recoverableExceptionCount = 0;
        connectionCloseForced = false;
        hostAuthState.invalidate();
        proxyAuthState.invalidate();
View Full Code Here

Examples of org.apache.commons.httpclient.params.HttpMethodParams

        getResponseTrailerHeaderGroup().clear();
        statusLine = null;
        effectiveVersion = null;
        aborted = false;
        used = false;
        params = new HttpMethodParams();
        responseBody = null;
        recoverableExceptionCount = 0;
        connectionCloseForced = false;
        hostAuthState.invalidate();
        proxyAuthState.invalidate();
View Full Code Here

Examples of org.apache.commons.httpclient.params.HttpMethodParams

        Status status = (Status) getStatus();
       
        try {
           
            HttpClient client = new HttpClient();
            HttpMethodParams methodParams = new HttpMethodParams();
            methodParams.setSoTimeout(Integer.parseInt(getTimeout()));
            methodParams.setVersion(HttpVersion.HTTP_1_1);
           
            GetMethod getMethod = new GetMethod();
            String ref = status.ref;
            getMethod.setURI(new URI(ref, false));
            getMethod.setParams(methodParams);
View Full Code Here

Examples of org.apache.commons.httpclient.params.HttpMethodParams

    log.trace("put: " + newUri);
    notifyStartRequest();
    String s = urlEncode(newUri);
    PutMethod p = new PutMethod(s);

    HttpMethodParams params = new HttpMethodParams();
    params.setSoTimeout(timeout);
    p.setParams(params);
    try {
      RequestEntity requestEntity;
      if (contentLength == null) {
        log.trace("no content length");
View Full Code Here

Examples of org.apache.commons.httpclient.params.HttpMethodParams

        getResponseTrailerHeaderGroup().clear();
        statusLine = null;
        effectiveVersion = null;
        aborted = false;
        used = false;
        params = new HttpMethodParams();
        responseBody = null;
        recoverableExceptionCount = 0;
        connectionCloseForced = false;
        hostAuthState.invalidate();
        proxyAuthState.invalidate();
View Full Code Here

Examples of org.apache.commons.httpclient.params.HttpMethodParams

  @SuppressWarnings("deprecation")
  private void doPost(PostMethod method, RequestEntity data, String dest)
      throws IOException, HttpException
  {
   
    HttpMethodParams pars = method.getParams();
    pars.setParameter (HttpMethodParams.RETRY_HANDLER, (Object) new HttpMethodRetryHandler()
    {
      public boolean retryMethod(HttpMethod m, IOException e, int exec)
      {
        return !(e instanceof java.net.ConnectException) && (exec < MAX_RETRIES_PER_COLLECTOR);
      }
View Full Code Here

Examples of org.apache.commons.httpclient.params.HttpMethodParams

        getResponseTrailerHeaderGroup().clear();
        statusLine = null;
        effectiveVersion = null;
        aborted = false;
        used = false;
        params = new HttpMethodParams();
        responseBody = null;
        recoverableExceptionCount = 0;
        connectionCloseForced = false;
        hostAuthState.invalidate();
        proxyAuthState.invalidate();
View Full Code Here

Examples of org.apache.commons.httpclient.params.HttpMethodParams

     */
    private List<NameValuePair> params = new ArrayList<NameValuePair>();

    public PostMethod(String uri) {
        super(uri);
        HttpMethodParams params = getParams();
        params.setContentCharset("UTF-8");
    }
View Full Code Here

Examples of org.apache.commons.httpclient.params.HttpMethodParams

        HttpMethod method = createMethod(exchange);
        Message in = exchange.getIn();
        String httpProtocolVersion = in.getHeader(Exchange.HTTP_PROTOCOL_VERSION, String.class);
        if (httpProtocolVersion != null) {
            // set the HTTP protocol version
            HttpMethodParams params = method.getParams();
            params.setVersion(HttpVersion.parse(httpProtocolVersion));
        }

        HeaderFilterStrategy strategy = getEndpoint().getHeaderFilterStrategy();

        // propagate headers as HTTP headers
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.