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

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

本文整理了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

  1. /**
  2. * @since 4.4
  3. */
  4. public Executor authPreemptive(final String host) {
  5. return authPreemptive(HttpHost.create(host));
  6. }

代码示例来源:origin: org.apache.sling/org.apache.sling.distribution.core

  1. private Executor buildAuthExecutor(String username, String password) {
  2. URI uri = distributionEndpoint.getUri();
  3. Executor executor = Executor.newInstance()
  4. .auth(new HttpHost(uri.getHost(), uri.getPort(), uri.getScheme()), username, password)
  5. .authPreemptive(new HttpHost(uri.getHost(), uri.getPort(), uri.getScheme()));
  6. log.debug("authenticate user={}, endpoint={}", username, uri);
  7. return executor;
  8. }

代码示例来源:origin: Adobe-Consulting-Services/acs-aem-commons

  1. if (username != null && password != null) {
  2. HttpHost httpHost = new HttpHost(hostname, port, useSSL ? "https" : "http");
  3. executor.auth(httpHost, username, password).authPreemptive(httpHost);

代码示例来源:origin: com.adobe.acs/acs-aem-commons-bundle

  1. if (username != null && password != null) {
  2. HttpHost httpHost = new HttpHost(hostname, port, useSSL ? "https" : "http");
  3. executor.auth(httpHost, username, password).authPreemptive(httpHost);

相关文章