http-server-1.0.6: A library for writing Haskell web servers.

Copyright(c) Galois, Inc. 2007, 2008
LicenseBSD3
Maintainerdiatchki@galois.com
Stabilityprovisional
Portability
Safe HaskellNone
LanguageHaskell98

Network.HTTP.Server.HtmlForm

Description

 

Synopsis

Documentation

data FormFields

An abstraction of a map mapping form fields to their values.

Instances

fieldNames :: FormFields -> [String]

The names of the fields that were posted.

hasField :: FormFields -> String -> Bool

Do we have the given field?

lookupString :: FormFields -> String -> Maybe String

Lookup a field value as a string.

lookupRead :: Read a => FormFields -> String -> Maybe a

Lookup a field value and try to parse it.

toList :: FormFields -> [(String, String)]

The fields as pairs of strings.

fromRequest :: Request String -> Maybe FormFields

Try to parse the body of a request.