MCPcopy Create free account
hub / github.com/DeNA/PacketProxy / getCookie

Method getCookie

src/main/java/core/packetproxy/http/Http.java:745–752  ·  view source on GitHub ↗
(String key)

Source from the content-addressed store, hash-verified

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");

Callers

nothing calls this directly

Calls 6

getHeaderMethod · 0.95
getAllValueMethod · 0.80
mapMethod · 0.45
streamMethod · 0.45
decodeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected