Conduit v0.12.10 Conduit.ContentType.Text View Source

Handles converting a message body to and from Text.

Link to this section Summary

Functions

Formats the message body to text

Parses the body from text

Link to this section Functions

Formats the message body to text.

Examples

iex> import Conduit.Message
iex> message =
iex>   %Conduit.Message{}
iex>   |> put_body("my message")
iex>   |> Conduit.ContentType.Text.format([])
iex> message.body
"my message"

Parses the body from text.

Examples

iex> import Conduit.Message
iex> message =
iex>   %Conduit.Message{}
iex>   |> put_body("my message")
iex>   |> Conduit.ContentType.Text.parse([])
iex> message.body
"my message"