WashNGo-2.12.0.1: WASH is a family of EDSLs for programming Web applications in Haskell.Source codeContentsIndex
WASH.CGI.CGITypes
Description
Types of outputable data.
Synopsis
newtype URL = URL {
unURL :: String
}
data FileReference = FileReference {
fileReferenceName :: FilePath
fileReferenceContentType :: String
fileReferenceExternalName :: String
}
data ResponseFileReference = ResponseFileReference FilePath
data Status = Status {
statusCode :: Int
statusReason :: String
statusContent :: Maybe (WithHTML () IO ())
}
newtype Location = Location URL
data FreeForm = FreeForm {
ffName :: String
ffContentType :: String
ffRawContents :: String
}
data CGIOption
= NoPort
| AutoPort
| Port Int
| NoHttps
| AutoHttps
| FullURL
| PartialURL
| SessionMode {
unSessionMode :: SessionMode
}
type CGIOptions = [CGIOption]
data SessionMode
= LogOnly
| StateIDOnly
| LogAndState
sessionNeedsLog :: SessionMode -> Bool
sessionNeedsState :: SessionMode -> Bool
Documentation
newtype URL Source
Constructors
URL
unURL :: String
data FileReference Source
Constructors
FileReference
fileReferenceName :: FilePathvalid local filename where this file can be accessed
fileReferenceContentType :: String
fileReferenceExternalName :: String
data ResponseFileReference Source
Assumes that file contains correctly formatted HTTP Response starting with Content-Type. Used internally to implement frames.
Constructors
ResponseFileReference FilePath
data Status Source
Constructors
Status
statusCode :: Intstatus code
statusReason :: Stringreason phrase
statusContent :: Maybe (WithHTML () IO ())more explanation
newtype Location Source
Constructors
Location URLredirection
data FreeForm Source
Constructors
FreeForm
ffName :: Stringinternal name
ffContentType :: StringMIME type
ffRawContents :: Stringcontents as octet stream
data CGIOption Source
Constructors
NoPortdo not include port number in generated URLs
AutoPortinclude automatically generated port number in generated URLs (default)
Port Intuse this port number in generated URLs
NoHttpsdo not attempt to detect Https
AutoHttpsautodetect Https by checking for port number 443 and env var HTTPS (default)
FullURLgenerate full URL including scheme, host, and port
PartialURLgenerate absolute path URL, only (default)
SessionMode
unSessionMode :: SessionMode
type CGIOptions = [CGIOption]Source
data SessionMode Source
Constructors
LogOnlygenerate log in hidden field, full server replay (default)
StateIDOnlygenerate state id, server threads without replay (only with WSP)
LogAndStatelog and state id, server threads with replay as fallback (only with WSP)
sessionNeedsLog :: SessionMode -> BoolSource
sessionNeedsState :: SessionMode -> BoolSource
Produced by Haddock version 2.6.1