NUXT_E3001

useFetch request URL starts with "//".

E3001

The URL passed to useFetch() starts with //. A protocol-relative URL like this resolves to an external host, which is almost never intended and is rejected to avoid leaking requests to a different origin.

Resolution

Use an absolute URL with an explicit protocol, or a relative path:

useFetch('/api/data')
useFetch('https://api.example.com/data')
Read more in Docs > API > Composables > Use Fetch.
Was this helpful?