// Send the data
try {
- xhr.send( type === "POST" || type === "PUT" || type === "DELETE" ? s.data : null );
+ xhr.send( (type !== "GET" && s.data) || null );
} catch( sendError ) {
jQuery.ajax.handleError( s, xhr, null, e );
})
});
+test("data option: empty bodies for non-GET requests", function() {
+ stop();
+ jQuery.ajax({
+ url: "data/echoData.php",
+ data: undefined,
+ type: "post",
+ success: function(result) {
+ equals( result, "" );
+ start();
+ }
+ })
+});
+
test("jQuery.ajax - If-Modified-Since support", function() {
expect( 3 );