Function parse

Source
pub fn parse<T: StreamReader>(
    partial_bytes: Vec<u8>,
    headers: &Headers,
    reader: T,
    limits: Limits,
) -> Result<Vec<FormPart>, MultipartFormDataError>
Expand description

It expects that the header has been completely read including \r\n\r\n characters.

Here’s example:

----------------------------648887867674240986891965
Content-Disposition: form-data; name="name"

John Doe
----------------------------648887867674240986891965
Content-Disposition: form-data; name="file"; filename="a.txt"
Content-Type: text/plain


hello

----------------------------648887867674240986891965
Content-Disposition: form-data; name="gender"

male
----------------------------648887867674240986891965--