javascript - I cannot stop AJAX from escaping request body I pass -
i need pass json request server, ajax escapes every character pass. not want this.
for example, if pass empty object,
{}
the server received escaped sequence
%7b%7d=
my ajax call is:
$.ajax({ url: 'http://my-server-name.com:8002/store_test', datatype: 'text', data: "{}", processdata: false, type: 'post', success: function(data) { console.log(data); } });
how disable escaping?
try use jquery post.
$.post("http://my-server-name.com:8002/store_test", { //your post data //data:"hi", }) .done(function(data) { console.log(data); }).fail(function() { alert( "error" ); });
Comments
Post a Comment