Alias options.method to options.type. Fixes #12004.

This commit is contained in:
Matt Farmer
2012-11-28 23:59:37 +01:00
committed by jaubourg
parent 9ae6b1a019
commit 081c4efcf7

View File

@@ -431,6 +431,9 @@ jQuery.extend({
// We also use the url parameter if available
s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
// Alias method option to type as per ticket #12004
s.type = options.method || options.type || s.method || s.type;
// Extract dataTypes list
s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( core_rnotwhite ) || [""];