Exemple #1
0
        protected override void invoke(Action action)
        {
            // Just let the normal model binding do its thing here,
            // but "correct" anything that is missing
            var mimetype = _fubuRequest.Get <CurrentMimeType>();

            if (!mimetype.AcceptTypes.Any() && _httpRequest.IsAjaxRequest())
            {
                mimetype.AcceptTypes = new MimeTypeList("application/json");
            }
        }