bodyStr method
Retrieves the entire body of the request as a string.
The bytes in the body of the HTTP request are interpreted as an UTF-8
encoded string. If the bytes cannot be decoded as UTF-8, a
FormatException
is thrown.
If the body has more than maxBytes
bytes, PostTooLongException is
thrown. Set the maxBytes to a value that is not less than the maximum
size the request handler ever expects to receive. This limit prevents
incorrect/malicious clients from flooding the request handler with
too much data om the body (e.g. several gigabytes). Note: the maximum
number of characters in the string may be equal to or less than the
maximum number of bytes, since a single Unicode code point may require
one or more bytes to encode.
Implementation
Future<String> bodyStr(int maxBytes) => _coreRequest.bodyStr(maxBytes);