protected RequestHandle sendRequest(DefaultHttpClient client,HttpContext httpContext,HttpUriRequest uriRequest,String contentType,ResponseHandlerInterface responseHandler,Context context){
  if (contentType != null) {
    uriRequest.addHeader("Content-Type",contentType);
  }
  responseHandler.setRequestHeaders(uriRequest.getAllHeaders());
  responseHandler.setRequestURI(uriRequest.getURI());
  Future<?> request=threadPool.submit(new AsyncHttpRequest(client,httpContext,uriRequest,responseHandler));
  if (context != null) {
    List<WeakReference<Future<?>>> requestList=requestMap.get(context);
    if (requestList == null) {
      requestList=new LinkedList<WeakReference<Future<?>>>();
      requestMap.put(context,requestList);
    }
    requestList.add(new WeakReference<Future<?>>(request));
  }
  return new RequestHandle(request);
}

protected RequestHandle sendRequest ( DefaultHttpClient client , HttpContext httpContext , HttpUriRequest uriRequest , String contentType , ResponseHandlerInterface responseHandler , Context context ) { if ( contentType != null ) { uriRequest . addHeader ( "Content-Type" , contentType ) ; } responseHandler . setRequestHeaders ( uriRequest . getAllHeaders ( ) ) ; responseHandler . setRequestURI ( uriRequest . getURI ( ) ) ; Future < ? > request = threadPool . submit ( new AsyncHttpRequest ( client , httpContext , uriRequest , responseHandler ) ) ; if ( context != null ) { List < WeakReference < Future < ? > > > requestList = requestMap . get ( context ) ; if ( requestList == null ) { requestList = new LinkedList < WeakReference < Future < ? > > > ( ) ; requestMap . put ( context , requestList ) ; } requestList . add ( new WeakReference < Future < ? > > ( request ) ) ; } return new RequestHandle ( request ) ; }
puts a new request in queue as a new thread in pool to be executed
