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