Hi.
I try use some post requests for another server (no, problem in not in cors-ajax)
var obj ={
username: "admin",
password: "admin"
}
wade.postObject( 'url/login', obj, function(callback){console.log(callback)} );
Recepient server work on node and wait json request:but what is:
wade.postObject send object as a plain text - it is feature or bug?
And how i can set custom headers to request?
I think is bag becasue jQuery same request
$.ajax({
url :'url/login',
type :'POST',
dataType:'json',
data : JSON.stringify(obj),
contentType:"application/json",
success: function(data, xhr){
console.log(data)
},
error:function(xhr, ajaxOptions, thrownError){
console.log(xnr)
}
});
Content-Type:application/json
And my API return true object