TypedBody is a decorator function getting application/json typed data from
request body. Also, it validates the request body data type through
typia and the validation speed is
maximum 20,000x times faster than class-validator.
For reference, when the request body data is not following the promised type T,
BadRequestException error (status code: 400) would be thrown.
Type safe body decorator.
TypedBody
is a decorator function gettingapplication/json
typed data from request body. Also, it validates the request body data type through typia and the validation speed is maximum 20,000x times faster thanclass-validator
.For reference, when the request body data is not following the promised type
T
,BadRequestException
error (status code: 400) would be thrown.