Пример #1
0
  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;
  }
Пример #2
0
 @Override
 public MediaType getContentType() {
   return DefaultMediaType.get(headers.get(HttpHeaderNames.CONTENT_TYPE));
 }
Пример #3
0
 public boolean isAjaxRequest() {
   return HttpHeaderConstants.XML_HTTP_REQUEST.equalsIgnoreCase(
       headers.get(HttpHeaderConstants.X_REQUESTED_WITH));
 }