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

x33g5p2x  于2022-01-28 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(187)

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

Request.useExpectContinue介绍

暂无

代码示例

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

public static boolean deletePackage(Executor executor, URI distributionURI, String remotePackageId) throws URISyntaxException, IOException {
  URI deleteUri = getDeleteUri(distributionURI, remotePackageId);
  Request deleteReq = Request.Post(deleteUri).useExpectContinue();
  HttpResponse httpResponse = executor.execute(deleteReq).returnResponse();
  return httpResponse.getStatusLine().getStatusCode() == 200;
}

代码示例来源:origin: com.github.lookout/metrics-datadog

.useExpectContinue()
.connectTimeout(this.transport.connectTimeout)
.socketTimeout(this.transport.socketTimeout)

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

public static InputStream fetchNextPackage(Executor executor, URI distributionURI, HttpConfiguration httpConfiguration)
    throws URISyntaxException, IOException {
  URI fetchUri = getFetchUri(distributionURI);
  Request fetchReq = Request.Post(fetchUri)
      .connectTimeout(httpConfiguration.getConnectTimeout())
      .socketTimeout(httpConfiguration.getSocketTimeout())
      .addHeader(HTTP.CONN_DIRECTIVE, HTTP.CONN_CLOSE)
      .useExpectContinue();
  HttpResponse httpResponse = executor.execute(fetchReq).returnResponse();
  if (httpResponse.getStatusLine().getStatusCode() != 200) {
    return null;
  }
  HttpEntity entity = httpResponse.getEntity();
  return entity.getContent();
}

代码示例来源:origin: org.coursera/metrics-datadog

.useExpectContinue()
.connectTimeout(this.transport.connectTimeout)
.socketTimeout(this.transport.socketTimeout);

代码示例来源:origin: streampipes/streampipes-ce

Response res = Request.Get(url).useExpectContinue().addHeader("Content-Type", "application/json")
    .version(HttpVersion.HTTP_1_1)
    .execute();

代码示例来源:origin: org.streampipes/streampipes-pipeline-management

Response res = Request.Get(url).useExpectContinue().addHeader("Content-Type", "application/json")
    .version(HttpVersion.HTTP_1_1)
    .execute();

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

.socketTimeout(httpConfiguration.getSocketTimeout())
.addHeader(HTTP.CONN_DIRECTIVE, HTTP.CONN_CLOSE)
.useExpectContinue();

相关文章