iex(1)> URI.encode("http://foo bar/", &(URI.char_unreserved?/1)) "http%3A%2F%2Ffoo%20bar%2F"