BuilderIO/builder

Additional request options for fetch

Closed this issue · 0 comments

Describe the bug
Next.JS has its own implementation of global fetch function. It accepts next: {} object with f.e. revalidation configuration or cache tags, to bust cache on demand.

It would be extremely useful to have this functionality enabled in Builder.io SDK. Essentially, it's a few lines of code that extend the get and getAll calls.

Next docs:
https://nextjs.org/docs/app/api-reference/functions/revalidateTag
https://nextjs.org/docs/app/api-reference/functions/fetch

To Reproduce

Expected behavior
Ability to add tags and revalidate to the Builder.io SDK requests, for enablement of on-demand and time-based Next.JS caching systems.