best practice for custom http responses #7174
Replies: 4 comments
|
@TomerSalton, do you mean to change the HTTP response outside the controller? |
|
Is there any plan to do first-class support on custom HTTP response (not just error-handling)? I've followed the solution on StackOverflow. However, this meant that the repository now expects an Otherwise, is there a way to create controller unit tests? |
|
See an example at https://github.com/strongloop/loopback-next/blob/master/packages/rest/src/__tests__/unit/writer.unit.ts. |
|
This issue has been marked stale because it has not seen activity within six months. If you believe this to be in error, please contact one of the code owners, listed in the |
Uh oh!
There was an error while loading. Please reload this page.
Hey,
I want to change the HTTP response (both errors and message) that is returned by the server.
Two examples:
Would you be able to provide me the best practice of implementing those HTTP responses customizations?
Thanks alot for your help,
Tomer.
All reactions