Does Nitro polyfill Node APIs like fetch? #1883
Answered
by
Hebilicious
sannajammeh
asked this question in
Q&A
-
Hi! We are building apps with Nitro and run all systems on Node v20 and v21. These have builtin support for fetch via Undici. Will Nitro polyfill this with node-fetch or similar? There is very little information about the internals of Nitro on the docs page. I am asking as the native Node.js fetch has support for Undici's CacheStorage API allowing us to cache things like JWKs from authorization servers at the runtime level. |
Beta Was this translation helpful? Give feedback.
Answered by
Hebilicious
Nov 5, 2023
Replies: 1 comment
-
Nitro uses https://github.com/unjs/ofetch, which will use |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
sannajammeh
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nitro uses https://github.com/unjs/ofetch, which will use
globalThis.fetch
when available.