mirror of
https://github.com/jquery/jquery.git
synced 2026-02-04 14:05:08 -05:00
Fix #11586. Ajax DELETE ain't got no body, so data goes to its URL.
This commit is contained in:
@@ -840,6 +840,21 @@ test("jQuery.ajax - HEAD requests", function() {
|
||||
|
||||
});
|
||||
|
||||
|
||||
test("jQuery.ajax - DELETE requests", function() {
|
||||
expect(1);
|
||||
|
||||
jQuery.ajax({
|
||||
url: "devo.html",
|
||||
type: "DELETE",
|
||||
data: { "whip": "it", "qty": "good" },
|
||||
beforeSend: function( _ , s ) {
|
||||
equal( s.url, "devo.html?whip=it&qty=good", "Delete requests encode data in URL" );
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
test("jQuery.ajax - beforeSend", function() {
|
||||
expect(1);
|
||||
stop();
|
||||
|
||||
Reference in New Issue
Block a user