Response handling
Handling server response with custom and pre-define responses
Response handling
The response handling done by resolving object, this will trigger the default response handler which return the resolved object with status code 200 and content-type
of application\json
for setting your own responses you can use the HttpResponse
class.
HttpResponse
This class equipped with builder and helper function with set to give you the ability to set the response content, status code and headers.
Usage example
Shorthand
Pre-defined responses
Forbidden
NotFound
Ok
ServerError
Unauthorized
BadRequest
Usage example
Last updated