What kind of body a Content-Type names: JSON (application/json,
text/json, any +json type), XML (application/xml, text/xml, any
+xml type) or neither.
Summary
Functions
The plain media type of a kind, the one a body the proxy writes itself
carries: application/json, application/xml.
The media type without its parameters, trimmed and in lower case
("Application/JSON; charset=utf-8" → "application/json"); nil for nil.
:json, :xml or nil for a media type (essence/1 first).
Functions
@spec base_type(:json | :xml) :: String.t()
The plain media type of a kind, the one a body the proxy writes itself
carries: application/json, application/xml.
The media type without its parameters, trimmed and in lower case
("Application/JSON; charset=utf-8" → "application/json"); nil for nil.
@spec kind(String.t() | nil) :: :json | :xml | nil
:json, :xml or nil for a media type (essence/1 first).