是否有一种更简单的方法来设置http客户端以进行抢先式基本身份验证,而不是此处描述的内容? 在以前的版本(3.x)中,它曾经是一个简单的方法调用(例如httpClient.getParams().setAuthenticationPreemptive(true)). 我想避免的主要是将BasicHttpContext添加到我执行的每个方法.
httpClient.getParams().setAuthenticationPreemptive(true)
java basic-authentication apache-commons-httpclient
apache-commons-httpclient ×1
basic-authentication ×1
java ×1