ivar v0.8.0 Ivar.QueryString

Ivar.QueryString manages the query string values to be appended to the url

Summary

Functions

Puts the given query params into the existing request map

Functions

put(request, params)
put(map, list | Keyword.t | map) :: map

Puts the given query params into the existing request map

Args

  • request - the map used to store the map of query string parameters, usually created via Ivar.new/2
  • params - the key/value params to put into the query string

Params

  • List of Key/value tuple - [{:key, "value"}, {"q", "ivar"}]
  • Keyword list - [key: "value"]
  • Map - %{key: "value"} | %{"key" => "value"}

Usage

iex> Ivar.QueryString.put(%{}, [q: "ivar"])
%{query: %{"q" => "ivar"}}