Fetch
Docs: https://docs.api.kunkun.sh/interfaces/ui.IFetch
When you use the built-in fetch
or http client like Axios directly in iframe or web worker,
you may encounter CORS issue.
fetch()
API provided in @kksh/api
sends the request through the host app, thus bypassing CORS.
'fetch:all'
permission is required to use this API.
Sample package.json
permission configuration: