Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add next and cache support #94

Open
misha000111 opened this issue Aug 12, 2023 · 1 comment
Open

add next and cache support #94

misha000111 opened this issue Aug 12, 2023 · 1 comment

Comments

@misha000111
Copy link

misha000111 commented Aug 12, 2023

In next.js 13 i have an error TS: Argument of type
{ method: "GET"; url: string; cache: string; params: any; }
is not assignable to parameter of type  string | Options 

can you add for nextjs 13 cache and next support:

1 fetch('https://...', { cache: 'force-cache' }) // force-cach | no-store

2 fetch('https://...', { next: { revalidate: 3600 } })

3 fetch('https://...', { next: { tags: ['collection'] } })

https://nextjs.org/docs/app/building-your-application/data-fetching/fetching-caching-and-revalidating#fetching-data-on-the-server-with-fetch

@suhaotian
Copy link

suhaotian commented Mar 2, 2024

Try xior: A request lib based on fetch with plugins support, and similar axios API

https://github.com/suhaotian/xior

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants