| 743 | } |
| 744 | |
| 745 | @SuppressWarnings("deprecation") |
| 746 | public String getCookie(String key) { |
| 747 | List<String> cookies = getHeader().getAllValue("Cookie"); |
| 748 | Map<String, String> cookieMap; |
| 749 | cookieMap = cookies.stream().flatMap(v -> Arrays.stream(v.split(";\\s*"))).map(kv -> kv.split("=")) |
| 750 | .collect(Collectors.toMap(kv -> URLDecoder.decode(kv[0]), kv -> URLDecoder.decode(kv[1]))); |
| 751 | return cookieMap.get(key); |
| 752 | } |
| 753 | |
| 754 | public String getOverrideHttpMethod() { |
| 755 | String tmp = this.getFirstHeader("X-HTTP-Method-Override"); |