fork download
  1. -module(prog).
  2. -export([main/0]).
  3. -import(http_uri, [parse/1]).
  4.  
  5. main() ->
  6. X = parse("http://e...content-available-to-author-only...e.com:8080/path/to/resource?q1=foo&q2=bar#fragmento"),
  7. R= io_lib:format("~p",[X]),
  8. io:fwrite(lists:flatten(R)),
  9. true.
Success #stdin #stdout 0.24s 8400KB
stdin
Standard input is empty
stdout
{http,[],"example.com",8080,"/path/to/resource","?q1=foo&q2=bar#fragmento"}