Rindle.Delivery.ContentDisposition (Rindle v0.1.5)

Copy Markdown View Source

Normalizes caller-supplied download disposition intent.

The normalized representation is shared across redirect-style adapter opts and future local header emission so delivery policy stays consistent.

Summary

Functions

Returns a normalized disposition map, or nil when the caller did not request one.

Types

disposition_type()

@type disposition_type() :: :inline | :attachment

t()

@type t() :: %{
  type: disposition_type(),
  filename: String.t(),
  filename_star: String.t()
}

Functions

normalize(key, opts)

@spec normalize(
  String.t(),
  keyword()
) :: t() | nil

Returns a normalized disposition map, or nil when the caller did not request one.