Skip to content

Conversation

@rob-bygrave
Copy link
Contributor

Support use case that requires programmatic control of status code but non-void controller method. This might be marginal but I don't think its a negative.

Support use case that requires programmatic control of status code but non-void controller method. This might be marginal but I don't think its a negative.
Copy link
Collaborator

@SentryMan SentryMan left a comment

Choose a reason for hiding this comment

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

expecting a negative status code one of these days?

@rob-bygrave
Copy link
Contributor Author

rob-bygrave commented Aug 8, 2023

expecting a negative status code one of these days?

Not really. The use case is pretty marginal in that if folks need programmatic control over the statusCode then they can take complete control, use a method that takes the ServerResponse / Context, returns void ... and completely control how the response is written.

This prevents any extra response.setStatus(...) being generated if for some reason they want that control but actually still return a non-void response and get the generated code to write the response body.

Its very marginal yeah.

@rob-bygrave rob-bygrave merged commit 616c255 into master Aug 8, 2023
@rob-bygrave rob-bygrave deleted the feature/inline-validLanguage branch August 8, 2023 04:13
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