Fox.UriExt
SourceSummary
encode_query(params) | just like |
fmt(uri, tuple) | Takes a template string and fills it in with stuff in the tuple |
Functions
just like URI.encode_query/1
, except it also encodes embedded lists and maps
Examples
query = [
dog: "rover",
cats: ["mrmittens", "fluffmeister"],
mascots: %{ember: "hamster", go: "gopher"}
] query |> encode_query # dog=rover&cats[]=mrmittens&cats[]=fluffmeister&mascots[ember]=hamster&mascots[go]=gopher
Takes a template string and fills it in with stuff in the tuple
Examples
“customers/:custmer_id/cards/:id” |> fmt({“cus_666”, “car_616”}) # customers/cus_666/cards/car_616