本文整理了Java中org.apache.http.client.fluent.Executor.authPreemptive()
方法的一些代码示例,展示了Executor.authPreemptive()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Executor.authPreemptive()
方法的具体详情如下:
包路径:org.apache.http.client.fluent.Executor
类名称:Executor
方法名:authPreemptive
暂无
代码示例来源:origin: org.apache.httpcomponents/fluent-hc
/**
* @since 4.4
*/
public Executor authPreemptive(final String host) {
return authPreemptive(HttpHost.create(host));
}
代码示例来源:origin: org.apache.sling/org.apache.sling.distribution.core
private Executor buildAuthExecutor(String username, String password) {
URI uri = distributionEndpoint.getUri();
Executor executor = Executor.newInstance()
.auth(new HttpHost(uri.getHost(), uri.getPort(), uri.getScheme()), username, password)
.authPreemptive(new HttpHost(uri.getHost(), uri.getPort(), uri.getScheme()));
log.debug("authenticate user={}, endpoint={}", username, uri);
return executor;
}
代码示例来源:origin: Adobe-Consulting-Services/acs-aem-commons
if (username != null && password != null) {
HttpHost httpHost = new HttpHost(hostname, port, useSSL ? "https" : "http");
executor.auth(httpHost, username, password).authPreemptive(httpHost);
代码示例来源:origin: com.adobe.acs/acs-aem-commons-bundle
if (username != null && password != null) {
HttpHost httpHost = new HttpHost(hostname, port, useSSL ? "https" : "http");
executor.auth(httpHost, username, password).authPreemptive(httpHost);
内容来源于网络,如有侵权,请联系作者删除!