ARTICLE AD BOX
I'm demoing the Telerik Kendo React Data Grid-- seems fairly straightforward to me but I am attempting to implement their useOdataDataSource hook to pull in data from my API. But for the life of me I cannot find anything in their docs about how to provide headers to send an auth token with the request.
AI helpers say to do this (which is 99% the same as their example except for the headers part):
const dataSource = useODataDataSource({ defaultSkip: 0, take: 10, transport: { read: { url: baseUrl + '/' + name, headers: { 'Authorization': `Bearer ${token}` }, }, delete: { url: (dataItem) => `${baseUrl}/${name}(${getter('ID')(dataItem)})` } }, schema: { model: { id: 'ID' } } });This will not work, since headers is not a valid property. I do not see where the headers / bearer token can be passed in with this method.
10.6k19 gold badges98 silver badges165 bronze badges
1
Explore related questions
See similar questions with these tags.
