Hi, i have a this code working properly. but i need a similar alternative using enyo. My question is based on the parameters in ajax.go(params).
$.ajax({
url: '
http://c1/api/SSB',
type: 'GET',
data: {
Token: 'infa9',
Method: 'GetAvailabilityDEV',
Parameters: [ {
Name: '
@server',
Value: 'u2283c'
}
]
},
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
alert(this.url) ;
console.log(data);
},
error: function (e) {
console.log(e);
}
});
The previous code is working and it generates my json format, but i cant do it using enyo, i have something like this:
var params = { method: "GetAvaillabilityDEV",
token: "infa9",
Name: '
@server',
Value: 'u2283c',
};
var ajax = new enyo.Ajax({
url: "
http://c1/api/SSB",
method: "GET",
handleAs: "json"
});
ajax.go(params);
ajax.response(this, "gotResponse");
},
Comments