Skip to main content

decode_utf8

Function decode_utf8 

Source
pub fn decode_utf8(body: &Bytes) -> AppResult<String>
Expand description

Decode body as UTF-8, stripping a leading UTF-8 BOM.

ยงErrors

Returns crate::error::ErrorKind::Parse when the body is not valid UTF-8.