@Override public TypedData getBody() { if (body == null) { body = new ByteBufBackedTypedData( content, DefaultMediaType.get(headers.get(HttpHeaders.Names.CONTENT_TYPE))); } return body; }
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 boolean isChunkedTransfer() { return Iterables.any( headers.getAll(HttpHeaderNames.TRANSFER_ENCODING), HttpHeaderValues.CHUNKED::contentEqualsIgnoreCase); }
@Override public boolean isExpectsContinue() { return Iterables.any( headers.getAll(HttpHeaderNames.EXPECT), HttpHeaderValues.CONTINUE::contentEqualsIgnoreCase); }
@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)); }