aspnetcore: Add missing Request.IsAjaxRequest
From @danroth27 on Thursday, April 2, 2015 3:18:15 PM
Copied from aspnet/mvc#2291.
In order to do something like this, you need the IsAjaxRequest method, which doesn’t seem to exist in ASP.NET 5.
Note: I think it’s Context.Request now, and not just Request .
Copied from original issue: aspnet/HttpAbstractions#245
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 21 (1 by maintainers)
This team is like US Congress nothing gets done. Just add the darn method we keep discussing it for over 21 months. jQuery is here to stay - we have 10 junior devs that are confused as heck. A task that used to take 10 seconds in MVC5 now requires every stinking project to “reinvent” the wheel by figuring out 1) where to put the extension, 2) which project-specific namespace to expect it in, 3) or which framework (written by what department) to add to include all the useful missing methods. C-mon, the frameworks purpose is to standardize the interface and let us expect where things are. And what’s wrong with adding yet another method with a different suffix in the future (remember Win32 API’s CreateFileEx anybody???). Don’t plan for the future, you can’t predict it. JUST DO IT (nike) Ts, ts, ts.