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

Slightly adjust responses without the need of building a response #433

Closed
Kaliumhexacyanoferrat opened this issue Dec 22, 2023 · 0 comments · Fixed by #439
Closed

Slightly adjust responses without the need of building a response #433

Kaliumhexacyanoferrat opened this issue Dec 22, 2023 · 0 comments · Fixed by #439
Labels
enhancement New feature or request
Milestone

Comments

@Kaliumhexacyanoferrat
Copy link
Owner

As a developer of a web service, I would like to change minor things of my response (such as the status code) without the need of changing my return type to IResponseBuilder so that my code stays cleaner and easier to read and maintain.

Example

[ResourceMethod(RequestMethod.PUT)]
public Result<Book> AddBook(Book book) 
{
  var entityDto = // ...;

  return new Result(entityDto, status: ResponseStatus.Created);
}

Acceptance criteria

  • This new feature can used anywhere the MethodHandler is used (such as controllers or inline handlers)
  • The feature has been documented on the website
  • At least the following properties can be adjusted: headers, status codes
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

Successfully merging a pull request may close this issue.

1 participant