#12004 closed feature (fixed)
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, ...
Change History (13)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
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.
comment:3 Changed 11 years ago by
Component: | unfiled → ajax |
---|
comment:4 Changed 10 years ago by
Type: | enhancement → feature |
---|
Bulk change from enhancement to feature.
comment:5 Changed 10 years ago by
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.
comment:6 Changed 10 years ago by
Priority: | undecided → low |
---|---|
Resolution: | → wontfix |
Status: | open → closed |
It doesn't sound like this will get done.
comment:7 Changed 10 years ago by
Resolution: | wontfix |
---|---|
Status: | closed → reopened |
Sorry, I'm +1 on aliasing type and method, just not switching type and dataType
comment:8 Changed 10 years ago by
Milestone: | None → 1.9 |
---|---|
Status: | reopened → open |
Version: | → 1.8.2 |
comment:10 Changed 10 years ago by
I've opened a pull request for this on Github. https://github.com/jquery/jquery/pull/1007
comment:11 Changed 10 years ago by
Owner: | set to dmethvin |
---|---|
Status: | open → assigned |
comment:12 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Alias options.method to options.type. Fixes #12004.
Changeset: 081c4efcf7736433d2fb5702e7bd4f8616426af2
comment:13 Changed 10 years ago by
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