httpoison_form_data v0.1.3 FormData.Formatters.Multipart

Link to this section Summary

Functions

The Multipart output function wraps the output of format in a structure denoting to HTTPoison (and hackney) that the data to be submitted is multipart

Link to this section Types

Link to this type entry()
entry() :: {entry_type(), path_value(), {form_data(), [metadata(), ...]}, []}
Link to this type entry_type()
entry_type() :: String.t() | :file
Link to this type file_metadata()
file_metadata() :: {filename_key(), filename()}
Link to this type filename()
filename() :: String.t()
Link to this type filename_key()
filename_key() :: String.t()
Link to this type form_data()
form_data() :: String.t()
Link to this type key_metadata()
key_metadata() :: {name_key(), name()}
Link to this type metadata()
metadata() :: file_metadata() | key_metadata()
Link to this type name()
name() :: String.t()
Link to this type name_key()
name_key() :: String.t()
Link to this type path_value()
path_value() :: String.t()
Link to this type t()
t() :: {:multipart, [entry()]}

Link to this section Functions

Link to this function output(stream, opts)
output(stream :: Enum.t(), _opts :: any()) :: FormData.Formatters.Multipart.t()

The Multipart output function wraps the output of format in a structure denoting to HTTPoison (and hackney) that the data to be submitted is multipart.

Examples

iex> FormData.Formatters.Multipart.output([{:key, "one"}], [])
{ :multipart, [{ "", "one", { "form-data", [ {"name", "\"key\""} ] }, [] }] }