Skip to content

add solution#189

Open
luchali wants to merge 2 commits intomate-academy:masterfrom
luchali:develop
Open

add solution#189
luchali wants to merge 2 commits intomate-academy:masterfrom
luchali:develop

Conversation

@luchali
Copy link
Copy Markdown

@luchali luchali commented Mar 23, 2026

No description provided.

Copy link
Copy Markdown

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Comment on lines +98 to +100
res.setHeader('Content-Type', 'application/json');

res.end(JSON.stringify(bodyParsed));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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! ✨

Footnotes

  1. Rate AI review example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants