Api keeps giving 404 error
Unanswered
Birman posted this in #help-forum
BirmanOP
17 Replies
share the path you are trying to access, and what do you get when you try to access it?
BirmanOP
postman gves this when i try to access the api route
BirmanOP
yes i am sure
@Birman postman gves this when i try to access the api route
this postman is local? Like is postman installed? Or is this the web version?
I would assume it's the local version, since it is able to access the next.js server
just the api is shown as 404
@B33fb0n3 this postman is local? Like is postman installed? Or is this the web version?
BirmanOP
it is installed
try restarting server
@averydelusionalperson try restarting server
BirmanOP
tried it
can you access other paths/pages?
@Birman Click to see attachment
Some causes that I can imagine:
1. OP has both src/app and app
2. OP’s middleware is doing some shenanigans to block /api
1. OP has both src/app and app
2. OP’s middleware is doing some shenanigans to block /api
yeah, if possible share your entire directory.
BirmanOP
thanks i fixed it
why does this code without headers gives a html response and 404 error and with header gives a json response
@Birman thanks i fixed it
How did you do that?
@Birman why does this code without headers gives a html response and 404 error and with header gives a json response
This is a new question, so make a new post