Conduit v0.12.10 Conduit.Plug.Builder View Source
A module that can be used to build plugs.
You can also use plugs within your custom plug. The plugs
will be run before call/3
.
Examples
iex> import Conduit.Message
iex>
iex> defmodule MyPipeline do
iex> use Conduit.Plug.Builder
iex>
iex> plug Conduit.Plug.Format
iex> plug Conduit.Plug.Encode
iex> end
iex>
iex> message =
iex> %Conduit.Message{}
iex> |> put_body("hi")
iex> |> MyPipeline.run
iex> message.body
"hi"
iex> message.content_type
"text/plain"
iex> message.content_encoding
"identity"
Link to this section Summary
Functions
A macro that stores a new plug. opts
will be passed unchanged to the new
plug