org.simpleframework.http.Request.getCookies()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(3.1k)|赞(0)|评价(0)|浏览(119)

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

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

相关文章