Personal tools

Url

From HaskellWiki

Revision as of 18:55, 12 December 2008 by AlmonPasra (Talk | contribs)

Jump to: navigation, search

[links|http://oufokme.ifrance.com/sitemap.htm] [links] [1] ((http://oufokme.ifrance.com/sitemap.htm links)) [| links] "links":http://oufokme.ifrance.com/sitemap.htm [james gardner movies|http://oufokme.ifrance.com/zellari859.htm] [james gardner movies] gardner movies ((http://oufokme.ifrance.com/zellari859.htm james gardner movies)) [| james gardner movies] "james gardner movies":http://oufokme.ifrance.com/zellari859.htm [microsoft power point presentation template|http://labooth.strefa.pl/power-point.htm] [microsoft power point presentation template] power point presentation template ((http://labooth.strefa.pl/power-point.htm microsoft power point presentation template)) [| microsoft power point presentation template] "microsoft power point presentation template":http://labooth.strefa.pl/power-point.htm [ortho evra online prescription|http://wejolly.strefa.pl/ortho-evra-online-20081127.html] [ortho evra online prescription] evra online prescription ((http://wejolly.strefa.pl/ortho-evra-online-20081127.html ortho evra online prescription)) [| ortho evra online prescription] "ortho evra online prescription":http://wejolly.strefa.pl/ortho-evra-online-20081127.html [synthroid and food|http://tpasrnrfi.ifrance.com/page1376.html] [synthroid and food] and food ((http://tpasrnrfi.ifrance.com/page1376.html synthroid and food)) [| synthroid and food] "synthroid and food":http://tpasrnrfi.ifrance.com/page1376.html [akon lonley lyric|http://ezpascal.strefa.pl/lonley-akon.htm] [akon lonley lyric] lonley lyric ((http://ezpascal.strefa.pl/lonley-akon.htm akon lonley lyric)) [| akon lonley lyric] "akon lonley lyric":http://ezpascal.strefa.pl/lonley-akon.htm [musica latina y video|http://wejolly.strefa.pl/musica-latina-videos-20081129.html] [musica latina y video] latina y video ((http://wejolly.strefa.pl/musica-latina-videos-20081129.html musica latina y video)) [| musica latina y video] "musica latina y video":http://wejolly.strefa.pl/musica-latina-videos-20081129.html [sports video highlight|http://clpatric.strefa.pl/henfiin-1360.html] [sports video highlight] video highlight ((http://clpatric.strefa.pl/henfiin-1360.html sports video highlight)) [| sports video highlight] "sports video highlight":http://clpatric.strefa.pl/henfiin-1360.html [caller digi.com.my ringtone|http://fokrdarc.ifrance.com/20081129-caller-digicommy.htm] [caller digi.com.my ringtone] digi.com.my ringtone ((http://fokrdarc.ifrance.com/20081129-caller-digicommy.htm caller digi.com.my ringtone)) [| caller digi.com.my ringtone] "caller digi.com.my ringtone":http://fokrdarc.ifrance.com/20081129-caller-digicommy.htm [index|http://fixpasxbu.ifrance.com/sitemap.html] [index] [2] ((http://fixpasxbu.ifrance.com/sitemap.html index)) [| index] "index":http://fixpasxbu.ifrance.com/sitemap.html [hirsute ladies|http://woelgin.interfree.it/topic-118.html] [hirsute ladies] ladies ((http://woelgin.interfree.it/topic-118.html hirsute ladies)) [| hirsute ladies] "hirsute ladies":http://woelgin.interfree.it/topic-118.html [wood gasification stoves|http://miminerv.strefa.pl/20081128-wood-gasification.html] [wood gasification stoves] gasification stoves ((http://miminerv.strefa.pl/20081128-wood-gasification.html wood gasification stoves)) [| wood gasification stoves] "wood gasification stoves":http://miminerv.strefa.pl/20081128-wood-gasification.html [tomato recipes|http://liendar.ifrance.com/page365.html] [tomato recipes] recipes ((http://liendar.ifrance.com/page365.html tomato recipes)) [| tomato recipes] "tomato recipes":http://liendar.ifrance.com/page365.html [licensed professional counselors medicare|http://vastack.interfree.it/20081205-licensed-professional.html] [licensed professional counselors medicare] professional counselors medicare ((http://vastack.interfree.it/20081205-licensed-professional.html licensed professional counselors medicare)) [| licensed professional counselors medicare] "licensed professional counselors medicare":http://vastack.interfree.it/20081205-licensed-professional.html [tips for metroid prime 2|http://enpasel.ifrance.com/1014678752.htm] [tips for metroid prime 2] for metroid prime 2 ((http://enpasel.ifrance.com/1014678752.htm tips for metroid prime 2)) [| tips for metroid prime 2] "tips for metroid prime 2":http://enpasel.ifrance.com/1014678752.htm [andrew school of medical transcription|http://lakinkea.strefa.pl/comment-1622.htm] [andrew school of medical transcription] school of medical transcription ((http://lakinkea.strefa.pl/comment-1622.htm andrew school of medical transcription)) [| andrew school of medical transcription] "andrew school of medical transcription":http://lakinkea.strefa.pl/comment-1622.htm [fort myers beach new homes|http://wejolly.strefa.pl/fort-myers-beach-20081128.html] [fort myers beach new homes] myers beach new homes ((http://wejolly.strefa.pl/fort-myers-beach-20081128.html fort myers beach new homes)) [| fort myers beach new homes] "fort myers beach new homes":http://wejolly.strefa.pl/fort-myers-beach-20081128.html [music pitbull shake video|http://wejolly.strefa.pl/music-pitbull-20081123.html] [music pitbull shake video] pitbull shake video ((http://wejolly.strefa.pl/music-pitbull-20081123.html music pitbull shake video)) [| music pitbull shake video] "music pitbull shake video":http://wejolly.strefa.pl/music-pitbull-20081123.html [handheld pos restaurant|http://miminerv.strefa.pl/20081122-restaurant-pos.html] [handheld pos restaurant] pos restaurant ((http://miminerv.strefa.pl/20081122-restaurant-pos.html handheld pos restaurant)) [| handheld pos restaurant] "handheld pos restaurant":http://miminerv.strefa.pl/20081122-restaurant-pos.html [pink floyd live at pompeii torrent|http://kamada.strefa.pl/page1518.html] [pink floyd live at pompeii torrent] floyd live at pompeii torrent ((http://kamada.strefa.pl/page1518.html pink floyd live at pompeii torrent)) [| pink floyd live at pompeii torrent] "pink floyd live at pompeii torrent":http://kamada.strefa.pl/page1518.html 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.