Code example for HttpRequest

Methods: getParams

0
                                           HttpRequest request,
                                           HttpContext context)
        throws HttpException { 
 
        if (target == null) {
            target = (HttpHost) request.getParams().getParameter(
                ClientPNames.DEFAULT_HOST);
        } 
        if (target == null) {
            throw new IllegalStateException("Target host must not be null, or set in parameters.");
        } 
 
        return this.routePlanner.determineRoute(target, request, context);
    } 
 
 
    /** 
     * Establishes the target route. 
     * 
     * @param route     the route to establish 
     * @param context   the context for the request execution