Created
February 21, 2018 13:58
-
-
Save cored/bf75c663e31be4688e8734e644e7fa4a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@doc """ | |
Parses | |
## Examples | |
iex>params_string = "name=Baloo&type=Brown" | |
iex>Servy.Parser.parse_params("application/x-www-form-urlencoded", | |
%{"name" => "Baloo", "type" => "Brown"}) | |
iex>Servy.Parser.parse_params("multipart/form-data", params_string, %{}) | |
""" | |
def parse_params("application/x-www-form-urlencoded", params_string) do | |
params_string |> String.trim |> URI.decode_query | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment