issue in understanding ajax post request
To be honset, I cannot find the answer to my question on the Internet. I
am new to ajax post.
I am wondering what is content-type and datatype in post request. suppose
I have a jhax post:
$.ajax({
type : "POST",
url : /v1/user,
datatype : "application/json",
contentType: "text/plain",
success : function() {
},
error : function(error) {
},
is contenttype what we send? so what we send in the example above in json
and what we recieve is a plain text? I donot really understand..
No comments:
Post a Comment