Hi all,
I currently try to interface dhtmlxsuite with postgrest & postgresql
(so no test possible in snippet)
Following code work well :
var dc_consultant = new dhx.DataCollection();
dhx.ajax.get("http://192.168.1.127:3000/consultant")
.then(function (data) {
dc_consultant.parse(data);
console.log(JSON.stringify(data));
})
.catch(function (err) {
console.log(err.status);
});
Following code don’t work :
var dc_consultant = new dhx.DataCollection();
dc_consultant.load("http://192.168.1.127:3000/consultant")
.then(function (data) {
console.log(JSON.stringify(data));
})
.catch(function (err) {
console.log(err.status);
});
with the load() function, when looking in network in chrome, the request GET fail in error with “415 (Unsupported Media Type)”
why there is a different result, and why the error is not trapped in my catch() ?
does load function send specific header in the GET ? (i suppose error is in Content-type)
or i miss something ?
best regards
PS : not critical as i have a walkthrough