onHandle method
Method called when something should be handled in this class
Implementation
@override
Future<Response> onHandle(Request request) async {
var endpointChain = this[request.method];
if (endpointChain == null) {
return Response(
request: request,
statusCode: 404,
headers: {},
contentType: ContentType.json,
body: '{"message":"The method does not exists"}',
);
}
return endpointChain.onHandle(request);
}