/** * Determine whether a given request has a formdata content-type. * * @return Whether the content-type of the request (defined in the Content-Type header) is a FORM_DATA type. */ public static boolean isFormDataContentType(final Request request) { return isFormDataContentType(request.getContentType().orElse(null)); }
/** * Determine whether a given request has a JSON content-type. * * @return Whether the content-type of the request (defined in the Content-Type header) is a JSON type. */ public static boolean isJsonContentType(final Request request) { return isJsonContentType(request.getContentType().orElse(null)); }