multipartkit/header

Values

pub fn boundary(
  content_type: String,
) -> Result(String, error.MultipartError)

Extract the boundary parameter from a Content-Type header value.

The error priority documented for parse is enforced here:

  1. InvalidContentType(value) — value cannot be parsed as a media type.
  2. UnsupportedMediaType(media_type) — top-level media type is not multipart/*.
  3. MissingBoundary — the boundary parameter is absent.
  4. InvalidBoundary(value) — present but violates the RFC 2046 grammar.
Search Document