Is it possible to use WEB.API as the datasource when its cross domain and needs an Authorization header set?
I know you can do cross domain with jsonp, but I read in another thread that with jsonp you can't use the beforeSend - setRequestHeader.
var aumData = new kendo.data.DataSource({
transport: {
read: {
url: '<%=Common.GetAppSetting("WebApiBaseUrl") %>Portfolio/Clients/Value',
dataType: "jsonp",
beforeSend: function (req) {
req.setRequestHeader("Authorization", "<%= this.webApiToken %>");
}
}
}
});
I know you can do cross domain with jsonp, but I read in another thread that with jsonp you can't use the beforeSend - setRequestHeader.
var aumData = new kendo.data.DataSource({
transport: {
read: {
url: '<%=Common.GetAppSetting("WebApiBaseUrl") %>Portfolio/Clients/Value',
dataType: "jsonp",
beforeSend: function (req) {
req.setRequestHeader("Authorization", "<%= this.webApiToken %>");
}
}
}
});