Skip to content
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

Ability to return a custom HTTPResponse as result of a validation inside the HTTPValidator response #40

Closed
malcommac opened this issue Apr 27, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@malcommac
Copy link
Collaborator

Feature Request

HTTPValidator responses include the ability to retry a call, fail the chain or move successfully to the next validator.
Sometimes you may want to slightly modify the received response by altering some values or return a custom subclass of the HTTPResponse with some data inside.

This involves some changes:

  • The HTTPResponse struct becomes a class so we can inherit from it
  • Some properties of the HTTPResponse must be marked as open
  • HTTPValidator allows a new return value of HTTPResponseValidatorResult called nextValidatorWithResponse which allows to return a new HTTPResponse instance which is forwarded along any subsequent validator until the end.

The important change is the transformation to struct which implies changes from the memory management side.

@malcommac malcommac self-assigned this Apr 27, 2022
@malcommac malcommac added the enhancement New feature or request label Apr 27, 2022
@malcommac malcommac added this to the 1.4.0 milestone Apr 27, 2022
malcommac added a commit that referenced this issue Apr 27, 2022
new #40: Added new return value for HTTPValidator along with tests
malcommac added a commit that referenced this issue Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant