Function multer::parse_boundary

source ·
pub fn parse_boundary<T: AsRef<str>>(content_type: T) -> Result<String>
Expand description

Parses the Content-Type header to extract the boundary value.

Examples

let content_type = "multipart/form-data; boundary=ABCDEFG";

assert_eq!(
    multer::parse_boundary(content_type),
    Ok("ABCDEFG".to_owned())
);