@nova-ts/core
Version:
A serverside framework used to build scalable application
24 lines (22 loc) • 669 B
TypeScript
/**
* Decorator to mark a method as an HTTP POST endpoint handler.
*
* Binds the method to the specified path, and ensures it responds to POST requests.
*
* Example usage:
* ```ts
* @Controller('/users')
* class UserController {
* @PostMapping('/{id}')
* updateUser(@PathVariable('id') id: string, @Body() userData: any) {
* // Handle POST /users/{id}
* }
* }
* ```
*
* @param {string} path - The URL path for the POST endpoint, relative to the controller's base path.
* @returns {MethodDecorator} The method decorator function.
* @author Inbaithi107
*/
declare function PostMapping(path: string): MethodDecorator;
export { PostMapping };