Code example for HttpUriRequest

Methods: getURI

0
*/ 
    } 
 
    public void setCredentials(HttpUriRequest request, String username, String password)
    { 
        URI uri = request.getURI();
        if (uri == null)
            return; 
 
        String host = uri.getHost();
        if (host == null)
            return; 
 
        int port = uri.getPort();
        if (port == 0) {
            if (uri.getScheme() == null)
                return; 
 
            if (uri.getScheme().equals("http"))
                port = 80;
            else if (uri.getScheme().equals("https"))