My issue here is not with the test, but with the results I got from it.
I finished the last challenge of the Basic Node and Express of the Backend certification and the form that the test ask me to try doesn’t work like It should but somehow the test passes anyway, meaning that my code doesn’t have errors (I like to think that). I’ll drop a screenshot of both my code and the results.
As you can see, the JSON I get from the post doesn’t show any useful information. I used both my answer (commented) and the answer provided by freeCodeCamp.
Like I said, the test passes anyway but I don’t know why it doesn’t show the name I write in the form.
Thank you for your time.
Your project link(s)
solution: boilerplate-express - Replit
Your browser information:
User Agent is:
Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.101 Safari/537.36
Challenge: Get Data from POST Requests
Link to the challenge:
I just tested out your repl.it and when I run it and enter a first and last name and submit them, the name comes shows in a JSON response. I assume you fixed the issue?
Hi, thank you for your answer
I didn’t fixed the issue, but I just tested the solution again, and I could notice that in the Replit preview of the page the correct outcome pops out but only for less than a second, and then the page shows the same as the screenshot posted. There’s no change in the register of the console thought.
What could it be?
Not sure what you mean. When I submit the form with John Doe, the console registers the submit with
POST /name - my-ip-address. What exactly are you expecting to see in the console when the submit button is clicked?
I got the same response from the console, what I meant to say was that maybe the console could do another POST without noticing, because like I said earlier when I press the submit buttom, I could see the correct answer for a brief moment, then the page go blank, and then shows the “undefined” values of my screenshot.
I really don’t know why that happens
Open the live url in a different window and I don’t believe it will do it. It may be something quirky about the in-pane view of the project loads.
I just tested the Url in another tab like you said and it worked, maybe it’s what you said
Thank you for your time!