Encodes nested data as application/x-www-form-urlencoded, the way Stripe
and Twilio expect it.
iex> Infusion.Runtime.Form.encode(%{"metadata" => %{"order" => "6735"}})
"metadata%5Border%5D=6735"Maps nest with brackets (metadata[order]=6735). Lists depend on style:
:indexed(Stripe):items[0][price]=p_1&expand[0]=customer:repeat(OpenAPI's default, Twilio):StatusCallbackEvent=a&StatusCallbackEvent=b
nil values are left out, so an optional parameter that was not given is
not sent.
Summary
Functions
Encodes data (a map or keyword list) as a form body.
Flattens data into [{"key[nested]", "value"}] pairs.
Functions
Encodes data (a map or keyword list) as a form body.
Flattens data into [{"key[nested]", "value"}] pairs.