Skip to content

best practice for custom http responses #3994

@TomerSalton

Description

@TomerSalton

Hey,

I want to change the HTTP response (both errors and message) that is returned by the server.
Two examples:

  1. If a user tries to send a PUT request in order to create an item, I want to return him a "ERROR 501 Not Implemented" response.
  2. If a user sends a POST request that requires a lot of processing power, I want to return HTTP 202 (Created).

Would you be able to provide me the best practice of implementing those HTTP responses customizations?

Thanks alot for your help,
Tomer.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions