本文整理了Java中org.simpleframework.http.Request.getCookies
方法的一些代码示例,展示了Request.getCookies
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getCookies
方法的具体详情如下:
包路径:org.simpleframework.http.Request
类名称:Request
方法名:getCookies
暂无
代码示例来源:origin: ngallagher/simpleframework
/**
* This is used to acquire all cookies that were sent in the header.
* If any cookies exists within the HTTP header they are returned
* as <code>Cookie</code> objects. Otherwise this method will an
* empty list. Each cookie object will contain the name, value and
* path of the cookie as well as the optional domain part.
*
* @return this returns all cookie objects from the HTTP header
*/
public List<Cookie> getCookies() {
return request.getCookies();
}
代码示例来源:origin: org.simpleframework/simple-http
/**
* This is used to acquire all cookies that were sent in the header.
* If any cookies exists within the HTTP header they are returned
* as <code>Cookie</code> objects. Otherwise this method will an
* empty list. Each cookie object will contain the name, value and
* path of the cookie as well as the optional domain part.
*
* @return this returns all cookie objects from the HTTP header
*/
public List<Cookie> getCookies() {
return request.getCookies();
}
代码示例来源:origin: org.simpleframework/simple
/**
* This is used to acquire all cookies that were sent in the header.
* If any cookies exists within the HTTP header they are returned
* as <code>Cookie</code> objects. Otherwise this method will an
* empty list. Each cookie object will contain the name, value and
* path of the cookie as well as the optional domain part.
*
* @return this returns all cookie objects from the HTTP header
*/
public List<Cookie> getCookies() {
return request.getCookies();
}
代码示例来源:origin: CodeStory/fluent-http
@Override
public Iterator<Cookie> iterator() {
return request.getCookies().stream().<Cookie>map(SimpleCookie::new).iterator();
}
代码示例来源:origin: CodeStory/fluent-http
@Override
public Map<String, String> keyValues() {
return request.getCookies().stream().collect(toMap(org.simpleframework.http.Cookie::getName, org.simpleframework.http.Cookie::getValue));
}
代码示例来源:origin: miltonio/milton2
public List<Cookie> getCookies() {
ArrayList<Cookie> list = new ArrayList<Cookie>();
for (org.simpleframework.http.Cookie c : baseRequest.getCookies()) {
list.add(new SimpletonCookie(c));
}
return list;
}
代码示例来源:origin: restx/restx
@Override
public ImmutableMap<String, String> getCookiesMap() {
Map<String, String> cookies = Maps.newLinkedHashMap();
for (Cookie cookie : request.getCookies()) {
cookies.put(cookie.getName(), cookie.getValue().replace("\\\"", "\""));
}
return ImmutableMap.copyOf(cookies);
}
代码示例来源:origin: io.restx/restx-server-simple
@Override
public ImmutableMap<String, String> getCookiesMap() {
Map<String, String> cookies = Maps.newLinkedHashMap();
for (Cookie cookie : request.getCookies()) {
cookies.put(cookie.getName(), cookie.getValue().replace("\\\"", "\""));
}
return ImmutableMap.copyOf(cookies);
}
代码示例来源:origin: miltonio/milton2
public Cookie getCookie(String name) {
for (org.simpleframework.http.Cookie c : baseRequest.getCookies()) {
if (c.getName().equals(name)) {
return new SimpletonCookie(c);
}
}
return null;
}
内容来源于网络,如有侵权,请联系作者删除!