本文整理了Java中org.eclipse.jetty.client.HttpClient.copyRequest()
方法的一些代码示例,展示了HttpClient.copyRequest()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpClient.copyRequest()
方法的具体详情如下:
包路径:org.eclipse.jetty.client.HttpClient
类名称:HttpClient
方法名:copyRequest
暂无
代码示例来源:origin: org.eclipse.jetty/jetty-client
private Request sendRedirect(final HttpRequest httpRequest, Response response, Response.CompleteListener listener, URI location, String method)
{
try
{
Request redirect = client.copyRequest(httpRequest, location);
// Use given method
redirect.method(method);
redirect.onRequestBegin(new Request.BeginListener()
{
@Override
public void onBegin(Request redirect)
{
Throwable cause = httpRequest.getAbortCause();
if (cause != null)
redirect.abort(cause);
}
});
redirect.send(listener);
return redirect;
}
catch (Throwable x)
{
fail(httpRequest, response, x);
return null;
}
}
代码示例来源:origin: airlift/airlift
@Override
protected Request copyRequest(HttpRequest oldRequest, URI newUri)
{
Request newRequest = super.copyRequest(oldRequest, newUri);
if (isPreserveAuthorization(oldRequest)) {
setPreserveAuthorization(newRequest, true);
for (HttpField field : oldRequest.getHeaders()) {
if (field.getHeader() == AUTHORIZATION) {
newRequest.header(field.getName(), field.getValue());
}
}
}
return newRequest;
}
代码示例来源:origin: com.proofpoint.platform/http-client
@Override
protected Request copyRequest(HttpRequest oldRequest, URI newUri)
{
Request newRequest = super.copyRequest(oldRequest, newUri);
if (isPreserveAuthorization(oldRequest)) {
setPreserveAuthorization(newRequest, true);
for (HttpField field : oldRequest.getHeaders()) {
if (field.getHeader() == AUTHORIZATION) {
newRequest.header(field.getName(), field.getValue());
}
}
}
return newRequest;
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
conversation.setAttribute(ATTRIBUTE, redirects);
Request redirect = client.copyRequest(request, location);
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
conversation.setAttribute(ATTRIBUTE, redirects);
Request redirect = client.copyRequest(request, location);
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
Request newRequest = client.copyRequest(request, uri);
authnResult.apply(newRequest);
newRequest.onResponseSuccess(new Response.SuccessListener()
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
Request newRequest = client.copyRequest(request, uri);
authnResult.apply(newRequest);
newRequest.onResponseSuccess(new Response.SuccessListener()
代码示例来源:origin: org.eclipse.jetty/jetty-client
path = request.getPath();
Request newRequest = client.copyRequest(request, requestURI);
if (path != null)
newRequest.path(path);
内容来源于网络,如有侵权,请联系作者删除!