Snap.Types

# The Snap Monad

data Snap a

runSnap

data NoHandlerException

## Functions for control flow and early termination

finishWith

pass

## Routing

method

path

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

rqModifyParams

rqSetParam

## Responses

emptyResponse

setResponseCode

setResponseStatus

rspStatus

rspStatusReason

setContentType

addCookie

setContentLength

clearContentLength

redirect

redirect'

### Response I/O

setResponseBody

modifyResponseBody

addToOutput

writeBS

writeLazyText

writeText

writeLBS

sendFile

sendFilePartial

# Iteratee

type Enumerator a

data SomeEnumerator

# HTTP utilities

formatHttpTime

parseHttpTime

urlEncode

urlDecode