hi,
i use refresh token and access token is updating every time
i need call function before call read method to get new token and set in read function
like grid , dropdownlist , ... read functions.
i use 'beforeSend' but it get one time token and in other call method dont update token.
dataSource = new kendo.data.DataSource({
transport: {
read: {
url: "https://localhost:44337/api/GetUserInstance",
type: 'Get',
beforeSend: async function (req) {
var token2 = await GetToken2();
req.setRequestHeader('Authorization', 'Bearer ' + token2.data);
}
}
},
change: function () {
}
});