Difference between revisions of "Url"

From HaskellWiki
Jump to navigation Jump to search
m (http://lakinkea.strefa.pl/comment-1622.htm)
m (Reverted edits by Tomjaguarpaw (talk) to last revision by Henk-Jan van Tuyl)
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[andrew school of medical transcription|http://lakinkea.strefa.pl/comment-1622.htm] [[http://lakinkea.strefa.pl/comment-1622.htm andrew school of medical transcription]] [http://lakinkea.strefa.pl/comment-1622.htm|andrew school of medical transcription] ((http://lakinkea.strefa.pl/comment-1622.htm andrew school of medical transcription)) [[http://lakinkea.strefa.pl/comment-1622.htm | 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] [[http://wejolly.strefa.pl/fort-myers-beach-20081128.html fort myers beach new homes]] [http://wejolly.strefa.pl/fort-myers-beach-20081128.html|fort myers beach new homes] ((http://wejolly.strefa.pl/fort-myers-beach-20081128.html fort myers beach new homes)) [[http://wejolly.strefa.pl/fort-myers-beach-20081128.html | 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] [[http://wejolly.strefa.pl/music-pitbull-20081123.html music pitbull shake video]] [http://wejolly.strefa.pl/music-pitbull-20081123.html|music pitbull shake video] ((http://wejolly.strefa.pl/music-pitbull-20081123.html music pitbull shake video)) [[http://wejolly.strefa.pl/music-pitbull-20081123.html | 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] [[http://miminerv.strefa.pl/20081122-restaurant-pos.html handheld pos restaurant]] [http://miminerv.strefa.pl/20081122-restaurant-pos.html|handheld pos restaurant] ((http://miminerv.strefa.pl/20081122-restaurant-pos.html handheld pos restaurant)) [[http://miminerv.strefa.pl/20081122-restaurant-pos.html | 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] [[http://kamada.strefa.pl/page1518.html pink floyd live at pompeii torrent]] [http://kamada.strefa.pl/page1518.html|pink floyd live at pompeii torrent] ((http://kamada.strefa.pl/page1518.html pink floyd live at pompeii torrent)) [[http://kamada.strefa.pl/page1518.html | 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.
 
The URL library provides a module Network.URL that makes it easy to work with HTTP URLs.
   

Latest revision as of 15:18, 6 February 2021

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.