Hi all,
I don't know whats happening on the below ajax calling. i tried lot but no use
*header* not work. Please suggest me on the below code.
Note : the below request always goes with "GET" type and without header "token".......
var url = 'api_url';
var dataSource = new kendo.data.DataSource({
type: "odata",
transport: {
read: {
url: url + 'GetCompanyContacts?UserId=123&CompanyId=123',
type:"POST",
beforeSend: function (xhr) {
xhr.setRequestHeader('TOKEN', 'tekenstring');
}
}
},
schema: {
total: "d.__count"
},
sort: {
field: "SubCategoryCode",
dir: "desc"
},
serverPaging: true,
serverSorting: true,
pageSize: 50
});
thanks in advance