Hi i want to add contentType:"application/json" to $.post method I don't want to use $.ajax as
$.ajax({
url:url,
type:"POST",
data:data,
contentType:"application/json",
dataType:"json",
success: function(){
//success code
}
but I want to use $.post method
$.post(url,data,function(result){
//success code
});
Please any one help me to specify contentType with $.post method
Aucun commentaire:
Enregistrer un commentaire