body property
dynamic
body
getter/setter pair
Contains data submitted in the request body.
By default, it is empty, and will be populated with
key-value pairs when we use use the built in body parser middleware,
such as text()
, json()
, urlencoded()
, multipart()
or bodyParser()
Use raw()
to save the raw bytes into this body.
final app = App();
app.use(json());
app.use(urlencoded());
app.use(multipart());
app.post('/', (req, res) {
print(req.body);
});
Implementation
dynamic body;