Jquery Post

Hi everybody,

I got this working:

$.ajax({

    formSubmit: true,


    type: 'POST',


    url: '/test/savetestinfos',


    data: { form: $('#yw1').serialize() }


});

but this:

$.post({

    formSubmit: true,


    type: 'POST',


    url: '/test/savetestinfos',


    data: { form: $('#yw1').serialize() }


});

gives me a 400 bad request. Could anybody explain me why?

Thanks a lot

post() has a different set of parameters than ajax() - http://api.jquery.com/jQuery.post/

yes, both are perform same functionality but have different parameters/implementation.

article for detail view:

http://forum.jquery.com/topic/what-should-i-use-post-vs-ajax