#3818 closed bug (worksforme)
$.ajax() requires data param if type is POST
Reported by: | ibrahim | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.3 |
Component: | ajax | Version: | 1.2.6 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
if i didn't set data option in $.ajax(); with type : "POST" the request will fail.
$('a').click(function () {
$.ajax({
url: $(this).attr('href'),
type: 'POST',
data: ,
success: function(data) { $('div').html(data); }
});
return false;
});
Attachments (1)
Change History (4)
Changed 14 years ago by
comment:1 Changed 14 years ago by
Summary: | Problem with $.ajax(); → $.ajax() requires data param if type is POST |
---|
comment:2 Changed 14 years ago by
Could you provide some feedback on the expected behavior? Although jQuery could set content-length=0 and do the POST, it seems like omitting the data parameter is most likely an error in the caller's code.
comment:3 Changed 12 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
This issue appears to be no longer existent
http://jsfiddle.net/rwaldron/WKfkh/9/
The ticket may be reopened if a new test case showing the broken behavior is submitted.
Note: See
TracTickets for help on using
tickets.
So if data is not supplied, you would want a POST with Content-length 0?