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

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

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

Request.Options介绍

暂无

代码示例

代码示例来源:origin: jooby-project/jooby

public Request options(final String path) {
 this.req = new Request(this, executor(), org.apache.http.client.fluent.Request.Options(host
   + path));
 return req;
}

代码示例来源:origin: dreamhead/moco

@Override
  public void run() throws IOException {
    assertThat(helper.get(remoteUrl("/proxy")), is("get_proxy"));
    assertThat(helper.postContent(remoteUrl("/proxy"), "proxy"), is("post_proxy"));
    Request putRequest = Request.Put(remoteUrl("/proxy")).bodyString("proxy", ContentType.DEFAULT_TEXT);
    assertThat(helper.executeAsString(putRequest), is("put_proxy"));
    Request deleteRequest = Request.Delete(remoteUrl("/proxy"));
    assertThat(helper.executeAsString(deleteRequest), is("delete_proxy"));
    Request headRequest = Request.Head(remoteUrl("/proxy"));
    StatusLine headStatusLine = helper.execute(headRequest).getStatusLine();
    assertThat(headStatusLine.getStatusCode(), is(200));
    Request optionsRequest = Request.Options(remoteUrl("/proxy"));
    assertThat(helper.executeAsString(optionsRequest), is("options_proxy"));
    Request traceRequest = Request.Trace(remoteUrl("/proxy"));
    assertThat(helper.executeAsString(traceRequest), is("trace_proxy"));
  }
});

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

@Override
public Request options(String partialUrl) {
  String url = baseUrl + partialUrl;
  return Request.Options(url);
}

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

@Override
public Request options(String partialUrl) {
  String url = baseUrl + partialUrl;
  return Request.Options(url);
}

代码示例来源:origin: org.apache.james/james-server-jmap-integration-testing

@When("^someone checks without authentification for the availability of the upload endpoint$")
public void optionUploadWithoutAuthentification() throws Throwable {
  Request request = Request.Options(uploadUri);
  response = request.execute().returnResponse();
}

代码示例来源:origin: org.apache.james/james-server-jmap-integration-testing

@When("^\"([^\"]*)\" checks for the availability of the upload endpoint$")
public void optionUpload(String username) throws Throwable {
  userStepdefs.authenticate(username);
  Request request = Request.Options(uploadUri);
  response = request.execute().returnResponse();
}

代码示例来源:origin: org.apache.james/james-server-jmap-integration-testing

@When("^\"([^\"]*)\" checks for the availability of the attachment endpoint$")
public void optionDownload(String username) throws Throwable {
  AccessToken accessToken = userStepdefs.authenticate(username);
  URI target = baseUri(mainStepdefs.jmapServer).setPath("/download/" + ONE_ATTACHMENT_EML_ATTACHMENT_BLOB_ID).build();
  Request request = Request.Options(target);
  if (accessToken != null) {
    request.addHeader("Authorization", accessToken.serialize());
  }
  response = request.execute().returnResponse();
}

相关文章