Description
When using the fetch function in core/helpers.ts
, it is not possible to supply credentials required to fetch a TD. Once I look at the underlying implementation, it calls the readResource
of the corresponding binding. This means that, if we change the fetch function's interface to accept credentials, it would need to be transferred to the corresponding binding. This might sadly require more changes since the credentials are added based on the id and there is no id at that point. It could very well be that where the TD is fetched have different security mechanism.
I would thus propose that instead of mapping fetch to readResource, another function can be created in each binding that has a different interface. This is related to an issue in Scripting API: w3c/wot-scripting-api#216