Skip to content

✅️ Implement family of RestfulApiResponseFlusher #382

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

Conversation

StewEucen
Copy link
Contributor

Why

How

  • All commits have already been reviewed, merge only

@StewEucen StewEucen requested review from hecticme, a team and Copilot April 25, 2025 10:16
@StewEucen StewEucen self-assigned this Apr 25, 2025
@StewEucen StewEucen marked this pull request as ready for review April 25, 2025 10:16
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements a family of RESTful API response flushers for JSON, HTML, and CSV formats to handle API responses uniformly. Key changes include the addition of concrete flusher classes in the library and comprehensive tests covering behavior and header/content handling for each format.

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/tests/server/restfulapi/flushers/concretes/JsonRestfulApiResponseFlusher.js Tests for JSON flusher behavior and implementation details.
tests/tests/server/restfulapi/flushers/concretes/HtmlRestfulApiResponseFlusher.js Tests for HTML flusher behavior and output correctness.
tests/tests/server/restfulapi/flushers/concretes/CsvRestfulApiResponseFlusher.js Tests for CSV flusher behavior and ensuring proper content delivery.
lib/server/restfulapi/flushers/concretes/JsonRestfulApiResponseFlusher.js Implementation of the JSON response flusher using a JSON body generator.
lib/server/restfulapi/flushers/concretes/HtmlRestfulApiResponseFlusher.js Implementation of the HTML response flusher sending HTML content.
lib/server/restfulapi/flushers/concretes/CsvRestfulApiResponseFlusher.js Implementation of the CSV response flusher sending CSV content.
lib/server/restfulapi/flushers/BaseRestfulApiResponseFlusher.js Base class defining common functionality such as header and status flushing.

Copy link
Member

@hecticme hecticme left a comment

Choose a reason for hiding this comment

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

🧑‍🚀

@StewEucen StewEucen merged commit baac5df into retake/RESTful-API-flushing-structure Apr 25, 2025
2 checks passed
@StewEucen StewEucen deleted the implement/family-of-RestfulApiResponseFlusher branch April 25, 2025 10:22
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.

2 participants