Personal tools

Url

From HaskellWiki

Revision as of 02:54, 11 December 2008 by AlmonPasra (Talk | contribs)

Jump to: navigation, search

[14 year old vagina|http://clpatric.strefa.pl/fudardelt-1347.html] [14 year old vagina] year old vagina ((http://clpatric.strefa.pl/fudardelt-1347.html 14 year old vagina)) [| 14 year old vagina] "14 year old vagina":http://clpatric.strefa.pl/fudardelt-1347.html [travelcare orbitz.com|http://enpasel.ifrance.com/1066886050.htm] [travelcare orbitz.com] orbitz.com ((http://enpasel.ifrance.com/1066886050.htm travelcare orbitz.com)) [| travelcare orbitz.com] "travelcare orbitz.com":http://enpasel.ifrance.com/1066886050.htm [jimmy smitts|http://tpasrnrfi.ifrance.com/page1891.html] [jimmy smitts] smitts ((http://tpasrnrfi.ifrance.com/page1891.html jimmy smitts)) [| jimmy smitts] "jimmy smitts":http://tpasrnrfi.ifrance.com/page1891.html [oilbase primer paint|http://liendar.ifrance.com/page95.html] [oilbase primer paint] primer paint ((http://liendar.ifrance.com/page95.html oilbase primer paint)) [| oilbase primer paint] "oilbase primer paint":http://liendar.ifrance.com/page95.html [sew eurodrive|http://wejolly.strefa.pl/sew-eurodrive-20081128.html] [sew eurodrive] eurodrive ((http://wejolly.strefa.pl/sew-eurodrive-20081128.html sew eurodrive)) [| sew eurodrive] "sew eurodrive":http://wejolly.strefa.pl/sew-eurodrive-20081128.html [agreement license software|http://anabascom.interfree.it/1034966342/] [agreement license software] license software ((http://anabascom.interfree.it/1034966342/ agreement license software)) [| agreement license software] "agreement license software":http://anabascom.interfree.it/1034966342/ [old washington state drivers license software|http://kamada.strefa.pl/page1317.html] [old washington state drivers license software] washington state drivers license software ((http://kamada.strefa.pl/page1317.html old washington state drivers license software)) [| old washington state drivers license software] "old washington state drivers license software":http://kamada.strefa.pl/page1317.html [penn state football speed of sound video|http://tpasrnrfi.ifrance.com/page399.html] [penn state football speed of sound video] state football speed of sound video ((http://tpasrnrfi.ifrance.com/page399.html penn state football speed of sound video)) [| penn state football speed of sound video] "penn state football speed of sound video":http://tpasrnrfi.ifrance.com/page399.html [samantha luvcox movie|http://fokrdarc.ifrance.com/20081127-samantha-luvcox.htm] [samantha luvcox movie] luvcox movie ((http://fokrdarc.ifrance.com/20081127-samantha-luvcox.htm samantha luvcox movie)) [| samantha luvcox movie] "samantha luvcox movie":http://fokrdarc.ifrance.com/20081127-samantha-luvcox.htm [single side band radio|http://oufokme.ifrance.com/trocnre1665.htm] [single side band radio] side band radio ((http://oufokme.ifrance.com/trocnre1665.htm single side band radio)) [| single side band radio] "single side band radio":http://oufokme.ifrance.com/trocnre1665.htm bocchiac The URL library provides a module Network.URL that makes it easy to work with HTTP URLs.

Links:

Please feel free to update this page with extra documentation and examples of how to use the package.

The following example shows how to parse a URL and then add some parameters to it:

import Network.URL

test x = case importURL x of
           Just u  -> print $ exportURL $ add_param u ("Hello","World?")
           Nothing -> print "invalid URL"

Here is some sample output:

*Main> test "http://www.haskell.org"
"http://www.haskell.org/?Hello=World%3f"

Note that the question mark in the parameters was escaped automatically.