org.eclipse.jetty.client.HttpClient.copyRequest()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(150)

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

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);

相关文章

HttpClient类方法