Next.js Discord

Discord Forum

not able to fetch a get request from api/hello/route.ts

Unanswered
adhiraj posted this in #help-forum
Open in Discord
I am trying to send a get request to an api route in the nextjs app. I am using version 14.2.4. The api route is working, I can test it in the browser, but when i send an axios request it spews an error - https://katb.in/tokumirajuz
when sending a fetch request it gives a TypeError: Failed to parse URL from /api/hello.
any help?

4 Replies