API: resource-http-controller
Source:
http/rs/resource-http-controller.ts
Interface for the context object passed to handler functions (before, serve, catch).
Classes
HttpController
The main class for handling HTTP requests and routing them to the correct resource handlers.
Methods
listen
listen (request:any, response:any):voidAlias for execute.
execute
execute (request?:any, response?:any):voidExecutes the request handling logic, finding the best matching resource and handler.
mappings
mappings ():ResourceMappingsReturns the ResourceMappings instance of this controller.
sendError
sendError (httpErrorCode:number, applicationErrorCode:any, errorName:string, errorDetails:string):voidSends an error response to the client, formatted based on the accepted media type.
closeResponse
closeResponse ():voidFlushes and closes the HTTP response stream.