hsp-0.5.2: Haskell Server Pages is a library for writing dynamic server-side web pages.

PortabilityHaskell 98
MaintainerNiklas Broberg, nibro@cs.chalmers.se



An interface to a request object as held in the HSP environment.



data Request Source

A record representing an interface to an HTTP request. This allows us to use many different underlying types for these requests, all we need is to supply conversions to this interface. This is useful for when we run as CGI, or when we run inside a server app.



getParameter :: Request -> String -> Maybe StringSource

Get a parameter from the request query string (GET) or body (POST). | Returns Nothing if the parameter is not set.

getParameter_ :: Request -> String -> StringSource

Unsafe version of getParameter, essentially fromJust.(getParameter r) but throws a ParameterLookupFailed exception if the parameter is not set.

readParameter :: Read a => Request -> String -> Maybe aSource

Return a value instead of a string.

readParameterL :: Read a => Request -> String -> [a]Source

Return a list of values read from their string representations.

readParameter_ :: Read a => Request -> String -> aSource

Unsafe version of readParameter