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

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

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

Request.Trace介绍

暂无

代码示例

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

public Request trace(final String path) {
 this.req = new Request(this, executor(), org.apache.http.client.fluent.Request.Trace(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"));
  }
});

相关文章