本文整理了Java中org.apache.http.client.fluent.Request.Trace
方法的一些代码示例,展示了Request.Trace
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.Trace
方法的具体详情如下:
包路径:org.apache.http.client.fluent.Request
类名称: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"));
}
});
内容来源于网络,如有侵权,请联系作者删除!