HttpClient client = factory.getHttpClient(); //or any method to get a client instance Credentials credentials = new UsernamePasswordCredentials(username, password); client.getState().setCredentials(AuthScope.ANY, credentials);
原创文章,作者:Maggie-Hunter,如若转载,请注明出处:https://blog.ytso.com/15961.html