本文整理了Java中org.eclipse.jetty.client.api.Request.attribute
方法的一些代码示例,展示了Request.attribute
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.attribute
方法的具体详情如下:
包路径:org.eclipse.jetty.client.api.Request
类名称:Request
方法名:attribute
暂无
代码示例来源:origin: com.proofpoint.platform/http-client
public static void setPreserveAuthorization(Request request, boolean preserveAuthorization)
{
request.attribute(PRESERVE_AUTHORIZATION_KEY, preserveAuthorization);
}
代码示例来源:origin: airlift/airlift
public static void setPreserveAuthorization(Request request, boolean preserveAuthorization)
{
request.attribute(PRESERVE_AUTHORIZATION_KEY, preserveAuthorization);
}
代码示例来源:origin: org.eclipse.jetty/jetty-proxy
proxyRequest.attribute(CLIENT_REQUEST_ATTRIBUTE, clientRequest);
proxyRequest.attribute(CONTINUE_ACTION_ATTRIBUTE, (Runnable)() ->
代码示例来源:origin: org.eclipse.jetty/jetty-proxy
proxyRequest.attribute(CLIENT_REQUEST_ATTRIBUTE, request);
proxyRequest.attribute(CONTINUE_ACTION_ATTRIBUTE, (Runnable)() ->
代码示例来源:origin: org.eclipse.jetty/jetty-client
@Override
public void onSuccess(Response response)
{
// Handling of success must be done here and not from onComplete(),
// since the onComplete() is not invoked because the request is not completed yet.
Request request = response.getRequest();
HttpConversation conversation = ((HttpRequest)request).getConversation();
// Mark the 100 Continue response as handled
request.attribute(ATTRIBUTE, Boolean.TRUE);
// Reset the conversation listeners, since we are going to receive another response code
conversation.updateResponseListeners(null);
HttpExchange exchange = conversation.getExchanges().peekLast();
if (response.getStatus() == HttpStatus.CONTINUE_100)
{
// All good, continue.
exchange.resetResponse();
exchange.proceed(null);
onContinue(request);
}
else
{
// Server either does not support 100 Continue,
// or it does and wants to refuse the request content,
// or we got some other HTTP status code like a redirect.
List<Response.ResponseListener> listeners = exchange.getResponseListeners();
HttpContentResponse contentResponse = new HttpContentResponse(response, getContent(), getMediaType(), getEncoding());
notifier.forwardSuccess(listeners, contentResponse);
exchange.proceed(new HttpRequestException("Expectation failed", request));
}
}
代码示例来源:origin: org.eclipse.jetty/jetty-client
conversation.setAttribute(EndPoint.class.getName(), endPoint);
connect.attribute(Connection.class.getName(), new ProxyConnection(destination, connection, promise));
内容来源于网络,如有侵权,请联系作者删除!