The new decorator function.
// index.ts
import { Controller, ControllerBase, GET, IHttpRequest, IHttpResponse, Parameter, Request, Response } from '@egomobile/http-server'
@Controller()
export default class IndexController extends ControllerBase {
@GET('/foo/:bar/buzz')
async getBar(
@Parameter() bar: string,
@Request() request: IHttpRequest, @Response() response: IHttpResponse
) {
response.write('bar: ' + bar)
}
}
Generated using TypeDoc
Imports the request context into an argument / parameter of a handler.