Skip to content

Instantly share code, notes, and snippets.

@etrepum
Created April 7, 2010 08:48
Show Gist options
  • Save etrepum/358675 to your computer and use it in GitHub Desktop.
Save etrepum/358675 to your computer and use it in GitHub Desktop.
$ erl -pa ebin
Erlang R13B03 (erts-5.7.4) [source] [smp:2:2] [rq:2] [async-threads:4] [kernel-poll:true]
Eshell V5.7.4 (abort with ^G)
1> Uri = ("/path?"
1> "referrer=http%3A//www.google.co.in/search%3Fclient%3Dsafari"
1> "%26rls%3Den%26q%3Dexample+wine%26ie%3DUTF-8%26oe%3DUTF-8"
1> "%26redir_esc%3D%26ei%3DJTC8S8zuE86_rAf0vdWzBw"
1> "&url=http%3A//www.example.com/&host=www.example.com"
1> "&flash_version=10,0,32&browser_language=en"),
1> Req = mochiweb:new_request(
1> {no_socket, {'GET', {abs_path, Uri}, {1, 1}}, []}),
1> Req:parse_qs().
[{"referrer",
"http://www.google.co.in/search?client=safari&rls=en&q=example wine&ie=UTF-8&oe=UTF-8&redir_esc=&ei=JTC8S8zuE86_rAf0vdWzBw"},
{"url","http://www.example.com/"},
{"host","www.example.com"},
{"flash_version","10,0,32"},
{"browser_language","en"}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment