Exercise is passing but I don't understand some of the results

So when I submit from the form it is pulling the right info from req.body but I don’t quite understand why another GET request is being fired off immediately after the POST request is dealt with. I feel it may have something to do with the res.json() being used in the POST route but would love a clear explanation.

Code and console log history:

Thanks!

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36

Challenge: Get Query Parameter Input from the Client

Link to the challenge:

My guess is because it’s a form submit it will refresh the page after the POST and then hit the / route which runs the GET.


As an aside, please post code or a link to your Replit instead of an image.

Thanks for your response.

That’s the only thing I can think of as well.

Thank you for the correction on my posting format.

Cheers

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.