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

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -