API calls to relative /api/
endpoint is not working inside getServerSideProps
#14604
Unanswered
harrisrobin
asked this question in
Help
Replies: 1 comment
-
Replace |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Bug report
Describe the bug
I'm calling a certain api (inside the /pages/api folder) in getServerSideProps and I'm getting an error i don't really understand.
To Reproduce
here's what my code looks like:
This is suppose to make a call to the absolute url, which locally would be
http://localhost:3000/api/favourites/list
however I always get the following error:Expected behavior
I was hoping it would hit my api endpoint.
Screenshots
If applicable, add screenshots to help explain your problem.
Beta Was this translation helpful? Give feedback.
All reactions