public Set<Cookie> getCookies() { if (cookies == null) { String header = headers.get(HttpHeaderNames.COOKIE); if (header == null || header.length() == 0) { cookies = Collections.emptySet(); } else { cookies = ServerCookieDecoder.STRICT.decode(header); } } return cookies; }
@Override public MediaType getContentType() { return DefaultMediaType.get(headers.get(HttpHeaderNames.CONTENT_TYPE)); }
public boolean isAjaxRequest() { return HttpHeaderConstants.XML_HTTP_REQUEST.equalsIgnoreCase( headers.get(HttpHeaderConstants.X_REQUESTED_WITH)); }