useFetch & URLSearchParams nuxt3 global middlewere
Guys i'm trying out
with this code I'm getting following error:
URLSearchParams should be available in Node so what's going on?
useFetch inside my global middlewere (ts file) I basically want to sent http request from the server side and use URLSearchParams as my API requires itwith this code I'm getting following error:
Error: Unknown object type "urlsearchparams"
at Object._object (index.mjs?v=b79dfc53:57:17)
at Object.dispatch (index.mjs?v=b79dfc53:34:30)
at Object._array (index.mjs?v=b79dfc53:88:16)
at Object._object (index.mjs?v=b79dfc53:53:30)
at Object.dispatch (index.mjs?v=b79dfc53:34:30)
at objectHash (index.mjs?v=b79dfc53:13:10)
at hash (index.mjs?v=b79dfc53:481:56)
at useFetch (fetch.mjs?v=b79dfc53:6:28)
at default (auth.server.global.ts:23:7)
at fn (nuxt.mjs?v=b79dfc53:141:27)
URLSearchParams should be available in Node so what's going on?