You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lib/src/http/Controller.ts

20 lines
450 B

import {Request} from './lifecycle/Request'
import {Container} from '../di'
import {CanonicalItemClass} from '../support/CanonicalReceiver'
/**
* Base class for controllers that define methods that
* handle HTTP requests.
*/
export class Controller extends CanonicalItemClass {
constructor(
protected readonly request: Request,
) {
super()
}
protected container(): Container {
return this.request
}
}