org.restlet.Request.setCookies()方法的使用及代码示例

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

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

Request.setCookies介绍

[英]Sets the modifiable series of cookies provided by the client. Note that when used with HTTP connectors, this property maps to the "Cookie" header. This method clears the current series and adds all entries in the parameter series.
[中]设置客户端提供的可修改cookie系列。请注意,当与HTTP连接器一起使用时,此属性映射到“Cookie”头。此方法清除当前序列并添加参数序列中的所有条目。

代码示例

代码示例来源:origin: org.restlet.osgi/org.restlet

@Override
public void setCookies(Series<Cookie> cookies) {
  wrappedRequest.setCookies(cookies);
}

代码示例来源:origin: org.restlet.osgi/org.restlet

/**
 * Sets the cookies provided by the client.
 * 
 * @param cookies
 *            The cookies provided by the client.
 * @see Request#setCookies(Series)
 */
public void setCookies(Series<Cookie> cookies) {
  getRequest().setCookies(cookies);
}

代码示例来源:origin: DeviceConnect/DeviceConnect-Android

request.setCookies(cookies);
Response response = new Response(request);
AuthPageServerResource.init(request, response);

代码示例来源:origin: org.restlet.jee/org.restlet.ext.jaxrs

private void addCookieParam(Request request, String representationAsText,
    Annotation annotation) {
  Series<Cookie> cookies = request.getCookies();
  if (cookies == null) {
    cookies = new Series<Cookie>(Cookie.class);
  }
  cookies.add(new Cookie(((CookieParam) annotation).value(),
      representationAsText));
  request.setCookies(cookies);
}

代码示例来源:origin: DeviceConnect/DeviceConnect-Android

LoginPageServerResource.getQuery().put(LoginPageServerResource.CONTINUE, continues);
request.setCookies(cookies);
request.setOriginalRef(requestReference);
request.setResourceRef(requestReference);

代码示例来源:origin: DeviceConnect/DeviceConnect-Android

Series<Cookie> cookies = new Series<>(Cookie.class);
cookies.add(AuthorizationBaseServerResource.ClientCookieID, sessionId);
request.setCookies(cookies);

相关文章