javascript - jQuery AJAX: Posting serialized form data with $.post() does not achieve the same result as $.ajax() -


i trying post data source sending form's data using jquery's shorthand method jquery.post() not capable achieve same result using full blue-print posting jquery.ajax().

please find below scripts i've used findings:

using $.post():

jquery.post(     "/full-path-to-service",     {   cache: false,          data: jquery(submittingform).serialize(),          _: jquery.now() },     null,     "json" ).done(function(data) {   // response handling }); 

using $.ajax():

jquery.ajax({     type: "post",     url: "/full-path-to-service",     data: jquery(submittingform).serialize(),     datatype: "json",     _: jquery.now() }).done(function(data) {     // response handling }); 

while able receive successful response server, service seemed not being fired not receiving information sent serialized in post request.

sniffing information being sent service able confirm information parsed incorrectly while using jquery.post.

please find differences below:

enter image description here

is there reasing jquery.post() not sending information in same way using blue-print posting jquery.ajax()?

you using jquery.post() function incorrectly. check documentation proper usage:

http://api.jquery.com/jquery.post/


Comments

Popular posts from this blog

php - Zend Framework / Skeleton-Application / Composer install issue -

c# - Better 64-bit byte array hash -

python - PyCharm Type error Message -