Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Great work on this task! The server correctly handles the form and saves the data. However, I'm requesting a change because the final response format doesn't meet the task requirements. Currently, after submitting the form in src/createServer.js, your server sends a response with the Content-Type set to application/json. The requirement is to return an HTML page that contains this JSON data. To fix this, please update the response handler to set the Content-Type header to text/html and wrap the JSON string in HTML, for example, using a <pre> tag to display it nicely on the page.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Important
Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.
Tip
If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.
Caution
Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.
Footnotes
src/createServer.js
Outdated
| res.setHeader('Content-Type', 'application/json'); | ||
|
|
||
| res.end(JSON.stringify(bodyParsed)); |
There was a problem hiding this comment.
The task requires returning an HTML page that contains the well-formatted JSON. Currently, you're sending a response with the Content-Type set to application/json. You should set the Content-Type to text/html and wrap the JSON string within HTML tags (e.g., <pre>) to display it on a page.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Excellent work on this submission! You've successfully addressed all the previous feedback, and your solution now fully meets all the task requirements. The server correctly sets the Content-Type to text/html and properly wraps the JSON response in an HTML page. I am approving your solution, great job!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
No description provided.