-
Notifications
You must be signed in to change notification settings - Fork 17k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Forkify API Error: Request timed out #386
Comments
when i try to visit this site https://forkify-api.herokuapp.com/api/v2/recipes/ i receive an error message { |
The I think the API should respond with a better message, and a different Http code in this case. We'll change it in the future. |
Thanks akozdev i noticed it worked on the browser but I didn't think to try it out in the code as it looked a bit weird |
However the goal was to sendJSON(url, recipe) but i get the error message so if i were to use this /recipes?search=pizza example i would get a list of pizza and not be able to send my own data |
|
To upload a new recipe, send a The sendJSON() function should already be configured to send const fetchPromise = fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(uploadData),
}); |
helpers.js:33
sendJSON @ helpers.js:33 |
I have seen the error an unused variable i was using fetch(url) when i had created a variable named fetchPro to store it already. Thanks a lot it was really helpful |
You're welcome! |
I've been learning with your course, and I find it amazing and all has been going smooth. Everything was fine before I went to bed last night, however, when I woke up this morning to continue with building the Forkify App, it keeps failing to generate data from the Forkify API. I visited the demo site (forkify-v2.netlify.app) and the same issue persisted. Please check kindly look into it.
The text was updated successfully, but these errors were encountered: