Side navigation
#12004 closed feature (fixed)
Opened July 02, 2012 09:08PM UTC
Closed November 28, 2012 11:16PM UTC
Last modified January 15, 2013 02:51AM UTC
Allow ajax.method as alias for ajax.type
Reported by: | david71rj | Owned by: | dmethvin |
---|---|---|---|
Priority: | low | Milestone: | 1.9 |
Component: | ajax | Version: | 1.8.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Suggestion to 1.9.
Can be better to rename the ajax.type to ajax.method? I generally read METHOD POST and not TYPE POST. ajax.dataType can be renamed to ajax.type, like TYPE SCRIPT, TYPE HTML, TYPE TEXT, ...
Attachments (0)
Change History (13)
Changed July 02, 2012 09:10PM UTC by comment:1
Changed July 03, 2012 04:43PM UTC by comment:2
status: | new → open |
---|
Agreed, I'd be good with an alias (and have expected it to be method
in the past) but we can't just rename it.
Changed July 14, 2012 01:59AM UTC by comment:3
component: | unfiled → ajax |
---|
Changed September 09, 2012 01:10AM UTC by comment:4
type: | enhancement → feature |
---|
Bulk change from enhancement to feature.
Changed October 15, 2012 02:22PM UTC by comment:5
The good approach is to keep using type
internally but accept and consider method
in the first place in the main ajax function:
options.type = options.method || options.type;
That way we can keep type
internally and not break existing prefilters and transports.
Changed October 15, 2012 05:41PM UTC by comment:6
priority: | undecided → low |
---|---|
resolution: | → wontfix |
status: | open → closed |
It doesn't sound like this will get done.
Changed October 15, 2012 06:02PM UTC by comment:7
resolution: | wontfix |
---|---|
status: | closed → reopened |
Sorry, I'm +1 on aliasing type and method, just not switching type and dataType
Changed October 15, 2012 06:02PM UTC by comment:8
milestone: | None → 1.9 |
---|---|
status: | reopened → open |
version: | → 1.8.2 |
Changed October 15, 2012 06:06PM UTC by comment:9
Yeah, dataType is inviable just now, to not cause breaks.
Changed October 24, 2012 04:22PM UTC by comment:10
I've opened a pull request for this on Github. https://github.com/jquery/jquery/pull/1007
Changed November 26, 2012 05:29PM UTC by comment:11
owner: | → dmethvin |
---|---|
status: | open → assigned |
Changed November 28, 2012 11:16PM UTC by comment:12
resolution: | → fixed |
---|---|
status: | assigned → closed |
Alias options.method to options.type. Fixes #12004.
Changeset: 081c4efcf7736433d2fb5702e7bd4f8616426af2
Changed January 15, 2013 02:51AM UTC by comment:13
summary: | Rename ajax.type to ajax.method → Allow ajax.method as alias for ajax.type |
---|
While it's possible to add an alias, I doubt we'll be able to complete "rename" the property - it would break everything that used $.ajax