public static RequestBodyParser get(H.Request req) { H.Format contentType = req.contentType(); RequestBodyParser parser = parsers.get(contentType); if (null == parser) { parser = TextParser.INSTANCE; } return parser; }
public static RequestBodyParser get(H.Request req) { H.Format contentType = req.contentType(); RequestBodyParser parser = parsers.get(contentType); if (null == parser) { parser = TextParser.INSTANCE; } return parser; }
H.Format contentType = cachedContentType.get(path); if (null == contentType) { contentType = req.contentType(); H.Format contentType = cachedContentType.get(path); if (null == contentType) { contentType = req.contentType();
H.Format contentType = cachedContentType.get(path); if (null == contentType) { contentType = req.contentType(); H.Format contentType = cachedContentType.get(path); if (null == contentType) { contentType = req.contentType();
fmt = req.contentType();
fmt = req.contentType();
public ActionContext applyContentType() { ActResponse resp = resp(); H.Format lastContentType = resp.lastContentType(); if (null != lastContentType && $.ne(H.Format.UNKNOWN, lastContentType)) { resp.commitContentType(); return this; } H.Request req = req(); H.Format fmt = req.accept(); if (H.Format.UNKNOWN == fmt) { fmt = req.contentType(); } applyContentType(fmt); return this; }
public boolean xmlEncoded() { return req().contentType() == H.Format.XML; }
public boolean jsonEncoded() { return req().contentType() == H.Format.JSON; }
public ActionContext applyContentType() { ActResponse resp = resp(); H.Format lastContentType = resp.lastContentType(); if (null != lastContentType && $.ne(H.Format.UNKNOWN, lastContentType)) { resp.commitContentType(); return this; } H.Request req = req(); H.Format fmt = req.accept(); if (H.Format.UNKNOWN == fmt) { fmt = req.contentType(); } applyContentType(fmt); return this; }
public boolean xmlEncoded() { return req().contentType() == H.Format.XML; }
public boolean jsonEncoded() { return req().contentType() == H.Format.JSON; }
public static H.Format contentTypeForErrorResult(H.Request<?> req) { H.Format fmt = req.accept(); if (req.isAjax()) { if (H.Format.UNKNOWN == fmt) { fmt = req.contentType(); } if (H.Format.JSON == fmt || H.Format.XML == fmt) { return fmt; } } return fmt.isText() ? fmt : H.Format.HTML; }
public static H.Format contentTypeForErrorResult(H.Request<?> req) { H.Format fmt = req.accept(); if (req.isAjax()) { if (H.Format.UNKNOWN == fmt) { fmt = req.contentType(); } if (H.Format.JSON == fmt || H.Format.XML == fmt) { return fmt; } } return fmt.isText() ? fmt : H.Format.HTML; }