http/rs/resource-http-controller
Documentation
Overview
Classes
HttpController
listen()
Alias for execute.
tslisten(request: any, response: any): void;
Parameter Type Description requestanyresponseanyReturns
- Type:
void- Description:
execute()
Executes the request handling logic, finding the best matching resource and handler.
tsexecute(request: any, response: any): void;
Parameter Type Description requestanyresponseanyReturns
- Type:
void- Description:
mappings()
Returns the ResourceMappings instance of this controller.
tsmappings(): ResourceMappings;Returns
- Type:
ResourceMappings- Description:
sendError()
Sends an error response to the client, formatted based on the accepted media type.
tssendError(httpErrorCode: number, applicationErrorCode: any, errorName: string, errorDetails: string): void;
Parameter Type Description httpErrorCodenumberapplicationErrorCodeanyerrorNamestringerrorDetailsstringReturns
- Type:
void- Description:
closeResponse()
Flushes and closes the HTTP response stream.
tscloseResponse(): void;Returns
- Type:
void- Description:
