Personal tools


From HaskellWiki

Revision as of 01:54, 5 December 2008 by AlmonPasra (Talk | contribs)

Jump to: navigation, search

bocchiac The URL library provides a module Network.URL that makes it easy to work with HTTP URLs.


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 ""

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