Snap.Types

# The Snap Monad

data Snap a

runSnap

class MonadSnap m

data NoHandlerException

## Functions for control flow and early termination

bracketSnap

finishWith

catchFinishWith

pass

terminateConnection

## Routing

method

methods

path

pathArg

dir

ifTop

route

routeLocal

## Access to state

getRequest

getResponse

putRequest

putResponse

modifyRequest

modifyResponse

localRequest

withRequest

withResponse

## Logging

logError

## Grabbing/transforming request bodies

runRequestBody

getRequestBody

transformRequestBody

# HTTP Datatypes and Functions

data Request

data Response

type Headers

class HasHeaders a

type Params

data Method

data Cookie

type HttpVersion

## Headers

addHeader

setHeader

getHeader

deleteHeader

ipHeaderFilter

ipHeaderFilter'

## Requests

rqServerName

rqServerPort

rqRemoteAddr

rqRemotePort

rqLocalAddr

rqLocalHostname

rqIsSecure

rqContentLength

rqMethod

rqVersion

rqCookies

rqPathInfo

rqContextPath

rqURI

rqQueryString

rqParams

rqParam

getParam

getParams

rqModifyParams

rqSetParam

## Responses

emptyResponse

setResponseCode

setResponseStatus

rspStatus

rspStatusReason

setContentType

addCookie

addResponseCookie

getResponseCookie

getResponseCookies

deleteResponseCookie

modifyResponseCookie

getCookie

readCookie

setContentLength

clearContentLength

redirect

redirect'

### Response I/O

setResponseBody

modifyResponseBody

addToOutput

writeBuilder

writeBS

writeLazyText

writeText

writeLBS

sendFile

sendFilePartial

## Timeouts

setTimeout

getTimeoutAction

# Iteratee

type Enumerator a m b

data SomeEnumerator

# HTTP utilities

formatHttpTime

parseHttpTime

urlEncode

urlDecode