本文整理了Java中org.restlet.data.Request.getCookies
方法的一些代码示例,展示了Request.getCookies
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getCookies
方法的具体详情如下:
包路径:org.restlet.data.Request
类名称:Request
方法名:getCookies
[英]Returns the modifiable series of cookies provided by the client. Creates a new instance if no one has been set.
[中]返回客户端提供的可修改cookie系列。如果未设置任何实例,则创建新实例。
代码示例来源:origin: internetarchive/heritrix3
public static List<Flash> getFlashes(Request request) {
List<Flash> flashes = new LinkedList<Flash>();
Series<Cookie> cookies = request.getCookies();
String flashdrops = cookies.getFirstValue("flashdrop");
if (StringUtils.isBlank(flashdrops)) {
return flashes;
}
for (String dropbox : flashdrops.split(",")) {
if(dropbox!=null) {
Flash flash = dropboxes.remove(Long.parseLong(dropbox));
if(flash!=null) {
flashes.add(flash);
}
}
}
return flashes;
}
代码示例来源:origin: org.restlet/org.restlet
/**
* Returns the cookies provided by the client.
*
* @return The cookies provided by the client.
*/
@Override
public Series<Cookie> getCookies() {
return getWrappedRequest().getCookies();
}
代码示例来源:origin: org.archive.heritrix/heritrix-engine
public static List<Flash> getFlashes(Request request) {
List<Flash> flashes = new LinkedList<Flash>();
Series<Cookie> cookies = request.getCookies();
String flashdrops = cookies.getFirstValue("flashdrop");
if (StringUtils.isBlank(flashdrops)) {
return flashes;
}
for (String dropbox : flashdrops.split(",")) {
if(dropbox!=null) {
Flash flash = dropboxes.remove(Long.parseLong(dropbox));
if(flash!=null) {
flashes.add(flash);
}
}
}
return flashes;
}
代码示例来源:origin: org.restlet/org.restlet
final Series<Cookie> cookies = request.getCookies();
内容来源于网络,如有侵权,请联系作者删除!