Skip to content

feat(http-utils): add HTTP 202 Accepted response helper #722

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

slitviachenko
Copy link

Please ensure your pull request adheres to the following guidelines:

  • make sure to link the related issues in this description
  • when merging / squashing, make sure the fixed issue references are visible in the commits, for easy compilation of release notes

Related Issues

https://jira.corp.adobe.com/browse/SITES-31201

Adds a new accepted() function to the HTTP utilities to support HTTP 202 Accepted responses. This status code is commonly used for asynchronous operations where the request has been accepted for processing but the processing has not been completed.

Changes:

  • Added accepted() function to create 202 responses
  • Added TypeScript type declaration for the new function
  • Added unit tests to verify the function behavior

The function follows the same pattern as other response helpers like created() and ok(), providing a consistent API for creating HTTP responses.

@slitviachenko slitviachenko self-assigned this May 8, 2025
Copy link

github-actions bot commented May 8, 2025

This PR will trigger a minor release when merged.

@slitviachenko slitviachenko requested a review from dzehnder May 8, 2025 21:56
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