package multipart_form

  1. Overview
  2. Docs

Module Multipart_form.HeaderSource

HTTP Header.

Any part of a multipart/form-data document has a HTTP header which describes:

  • the type of contents.
  • the encoding used to transfer contents.
  • meta-data such as the associated name/key of contents.
  • some others meta information.

We allow the user to introspect the given header with useful functions.

Sourcetype t
Sourceval assoc : Field_name.t -> t -> Field.field list
Sourceval exists : Field_name.t -> t -> bool
Sourceval content_type : t -> Content_type.t

content_type header returns the Content_type value of header. If this value does not exists, it return default value.

Sourceval content_encoding : t -> Content_encoding.t

content_encoding returns the Content_encoding value of header. If this value does not exists, it return default value.

Sourceval content_disposition : t -> Content_disposition.t option

content_disposition returns the Content_disposition value of header if it exists.

Sourceval pp : t Fmt.t
Sourcemodule Decoder : sig ... end
OCaml

Innovation. Community. Security.