-
-
Notifications
You must be signed in to change notification settings - Fork 292
Closed
Labels
Description
@ResponseSet(headers) let you to configure response header from annotation.
@Controller("/calendars")
export class CalendarCtrl {
@Get("/:id")
@ResponseSet({"Content-Type": "application/json", status: 200})
public get(): ICalendar {
return <ICalendar> {id: request.params.id, name: "test"};
}
// or
@Get("/:id")
@ResponseSet("Content-Type", "application/json")
@ResponseSet("status", 200)
public get(): ICalendar {
return <ICalendar> {id: request.params.id, name: "test"};
}
}Annotation's name is a proposal. If you have a better idea of name, tell-it !
Reactions are currently unavailable