Exemplo n.º 1
0
  private ResponseStream sendSyncRequest(HttpRequest request, RequestParams params)
      throws HttpException {

    SyncHttpHandler handler = new SyncHttpHandler(httpClient, httpContext, responseTextCharset);

    handler.setExpiry(currentRequestExpiry);
    handler.setHttpRedirectHandler(httpRedirectHandler);
    request.setRequestParams(params);

    return handler.sendRequest(request);
  }
Exemplo n.º 2
0
  private ResponseStream sendSyncRequest(HttpRequest request, RequestParams params)
      throws HttpException {

    // liuzw. 增加安全加密步骤,加密过程可定制.
    if (secureInterceptor != null) {
      params = secureInterceptor.preSend(request, params);
    }

    SyncHttpHandler handler = new SyncHttpHandler(httpClient, httpContext, responseTextCharset);

    handler.setExpiry(currentRequestExpiry);
    handler.setHttpRedirectHandler(httpRedirectHandler);
    request.setRequestParams(params);
    return handler.sendRequest(request);
  }