difference between AJAX POST and GET
Posted
by Mohit Kumar
on Stack Overflow
See other posts from Stack Overflow
or by Mohit Kumar
Published on 2010-05-18T08:07:54Z
Indexed on
2010/05/18
8:10 UTC
Read the original article
Hit count: 293
c#
$.ajax({
type: 'POST',
url: path,
data: '{AreaID: ' + parentDropdownList.val() + '}',
contentType: 'application/json; charset=utf-8',
dataType: 'json',
success: function(response)
{
}
});
In above code I am using type: 'POST'. My senior told me that I also can use 'GET' in type. But dint find the difference between 'POST' and 'GET' and I also want to know what is the use of type, contentType, and dataType.
Could anyone one explain me why we use these type, contentType and dataType.
Thanks in advance.
© Stack Overflow or respective owner