|
|
|
|
|
|
| Synopsis |
|
|
|
|
| Requests
|
|
|
| Represents a CGI request. This contains the fundamental data
that is passed around the CGI application. Accessor functions
are provided to extract all the useful information.
| Instances | |
|
|
|
| Options that affect the way that HTTP requests are handled
| | Constructors | | RequestOptions | | | encoding :: Encoding | Handles request encoding translation
|
|
| Instances | |
|
|
| Accessors of Request
|
|
|
| Returns the request method (GET, POST etc) of the request
|
|
|
| Returns the path info of the request, with any leading forward slash removed,
and percent encoded chars interpreted according to the encoding.
|
|
|
Returns the URI requested by the client, with percent encoding intact
This can fail if the environment does not pass REQUEST_URI. Apache
always does pass this, so normally just use fromJust on the answer.
|
|
|
| a map containing the CGI environment var
|
|
|
| All of the POST name-value pairs. Use this if you need to iterate
through POST variables
|
|
|
| All of the GET name-value pairs. Use this if you need to iterate
through GET variables
|
|
|
| Retrieve a single POST value
|
|
|
Retrieve all the POST values with the given name
This is needed if values are submitted with the same name e.g. for
handling HTML SELECT elements
|
|
|
| returns True if the specified key is found in the
Request POST values
|
|
|
| Retrieve a single query string value (last one wins if there are multiple)
|
|
|
Retrieve all the query string values with the given name
This is needed if values are submitted with the same name
|
|
|
| returns True if the specified key is found in the
Request query string paramaters
|
|
| getCookieVal |
|
|
|
|
| a map of all uploaded files
|
|
| Constructors for Request
|
|
|
| :: [(String, String)] | association list of environment variables
| | -> ByteString | lazy ByteString containing request body
| | -> Encoding | Encoding to use for request
| | -> Request | | | Create a Request object
|
|
|
|
| :: RequestOptions | options which determine how the HTTP request is interpreted
| | -> IO Request | | | Creates a Request object according to the CGI protocol
|
|
|
|
Change a Request's encoding
Reinterprets the data in a Request according to new encoding. It
is not enough to just change the encoding value, as some data
that depends on the encoding has already been created.
|
|
| Escaping
|
|
| escapePath :: ByteString -> String | Source |
|
| Escapes a string of bytes with percent encoding
|
|
|
| Escapes a unicode string with percent encoding, using the supplied
bytestring/string Encoder
|
|
| Encodings
|
|
|
| Used to store conversion functions need to interpret CGI requests
| | Constructors | | Encoding | | | name :: String | descriptive name of the encoding
| | decoder :: ByteString -> String | convert ByteString to unicode string
| | encoder :: String -> ByteString | convert unicode string to ByteString
|
|
| Instances | |
|
|
|
| An Encoding for UTF8
|
|
| Files
|
|
|
| Represents an uploaded file
| | Constructors | | FileInput | | | fileFilename :: String | user supplied filename for file
| | fileContents :: ByteString | raw contents of the file
| | fileContentType :: ContentType | user supplied content-type of the file
|
|
| Instances | |
|
|
|
| A MIME media type value.
The Show instance is derived automatically.
Use showContentType to obtain the standard
string representation.
See http://www.ietf.org/rfc/rfc2046.txt for more
information about MIME media types.
| | Constructors | | ContentType | | | ctType :: String | The top-level media type, the general type
of the data. Common examples are
"text", "image", "audio", "video",
"multipart", and "application".
| | ctSubtype :: String | The media subtype, the specific data format.
Examples include "plain", "html",
"jpeg", "form-data", etc.
| | ctParameters :: [(String, String)] | Media type parameters. On common example is
the charset parameter for the "text"
top-level type, e.g. ("charset","ISO-8859-1").
|
|
| Instances | |
|
|
| Produced by Haddock version 2.4.2 |