getValidatedBody
T
getValidatedBody<
Get validated body from request (use after validateBody middleware)
Implementation
T getValidatedBody<T>(Request req) {
final value = _validatedBodies[(req as JSObject).hashCode];
return value == null
? throw StateError(
'No validated body found. Did you use validateBody middleware?',
)
: value as T;
}