I have created a service on dreamfactory and I’m trying to access it from my Kendo UI app. This is the portion of the code:
var dataSource = new kendo.data.DataSource({
transport: {
read: {
url: "https://dsp-droldan01-49722.cloud.dreamfactory.com/rest/sql/detalle?app_name=**api_key**",
type: "GET",
dataType: "json",
crossDomain : true,
beforeSend: function(req) {
req.setRequestHeader("Access-Control-Allow-Origin:", "*"),
req.setRequestHeader("Access-Control-Allow-Methods", "GET,POST,PUT,DELETE,OPTIONS"),
req.setRequestHeader("Access-Control-Allow-Headers", "X-ACCESS_TOKEN, Access-Control-Allow-Origin, Authorization, Origin, x-requested-with, Content-Type, Content-Range, Content-Disposition, Content-Description")
},
}
}
But I got an error:
GET https://dsp-droldan01-49722.cloud.dreamfactory.com/rest/sql/detalle?app_name=api_key b.ajaxTransport.send @ jquery.min.js:5b.extend.ajax @ jquery.min.js:5ct.extend.read @ kendo.all.min.js:11(anonymous function) @ kendo.all.min.js:11lt.extend._queueRequest @ kendo.all.min.js:11lt.extend.read @ kendo.all.min.js:11lt.extend.query @ kendo.all.min.js:11lt.extend._query @ kendo.all.min.js:11(anonymous function) @ kendo.all.min.js:11b.extend.Deferred @ jquery.min.js:3lt.extend.fetch @ kendo.all.min.js:11j.extend.init @ kendo.all.min.js:22(anonymous function) @ kendo.all.min.js:10b.extend.each @ jquery.min.js:3b.fn.b.each @ jquery.min.js:3yt.plugin.e.fn.(anonymous function) @ kendo.all.min.js:10(anonymous function) @ index.html:39b.Callbacks.c @ jquery.min.js:3b.Callbacks.p.fireWith @ jquery.min.js:3b.extend.ready @ jquery.min.js:3H @ jquery.min.js:3