raw function

Callback raw()

Middleware to fill request body with its raw bytes

Implementation

Callback raw() {
  return (Req req, Res res) async {
    // only do it once
    if (req.body is! Uint8List) {
      req.body = await req.request.bytes;
    }
  };
}