Skip to content

Instantly share code, notes, and snippets.

View knutin's full-sized avatar

Knut Nesheim knutin

View GitHub Profile
@knutin
knutin / gist:1383321
Created November 21, 2011 17:32 — forked from hukl/gist:1364952
Ruby vs Erlang building URL query params for a GET request
-module(urljoin).
-compile([export_all]).
s() ->
lists:flatten(urljoin([{foo, "bar"}, {baz, "quux"}, {fubar, "ok"}])).
%%iolist_to_binary(urljoin([{foo, "bar"}, {baz, "quux"}, {fubar, "ok"}])).
urljoin([{K, V}]) ->
[atom_to_list(K), "=", V];