Last active
November 21, 2016 19:37
-
-
Save mthadley/9e7a4d7041fd2b4a4b7070a1b6de850a to your computer and use it in GitHub Desktop.
Elm Url
This file contains 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
import Http exposing (encodeUri) | |
url : String -> List ( String, String ) -> String | |
url base = | |
let | |
encodeParts ( key, value ) = | |
(encodeUri key) ++ "=" ++ (encodeUri value) | |
in | |
(++) base << (++) "?" << String.join "&" << List.map encodeParts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment