org.apache.http.client.fluent.Executor.authPreemptive()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(204)

本文整理了Java中org.apache.http.client.fluent.Executor.authPreemptive()方法的一些代码示例,展示了Executor.authPreemptive()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Executor.authPreemptive()方法的具体详情如下:
包路径:org.apache.http.client.fluent.Executor
类名称:Executor
方法名:authPreemptive

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);

相关文章