Personal tools


From HaskellWiki

Revision as of 03:34, 11 December 2008 by Kenyon (Talk | contribs)

Jump to: navigation, search

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.