Skip to content

Instantly share code, notes, and snippets.

@ChristopherBiscardi
Created March 5, 2014 23:56
Show Gist options
  • Save ChristopherBiscardi/9379321 to your computer and use it in GitHub Desktop.
Save ChristopherBiscardi/9379321 to your computer and use it in GitHub Desktop.
import Snap.Internal.Http.Types
( Response(rspStatus, rspStatusReason),
Request(rqClientAddr, rqClientPort, rqContentLength, rqContextPath,
rqCookies, rqHeaders, rqHostName, rqIsSecure, rqLocalHostname,
rqMethod, rqParams, rqPathInfo, rqPostParams, rqQueryParams,
rqQueryString, rqServerAddr, rqServerPort, rqURI, rqVersion),
Params,
Method(..),
HttpVersion,
HasHeaders(..),
Cookie(..),
setResponseStatus,
setResponseCode,
setResponseBody,
setHeader,
setContentType,
setContentLength,
rqSetParam,
rqQueryParam,
rqPostParam,
rqParam,
rqModifyParams,
parseHttpTime,
modifyResponseCookie,
modifyResponseBody,
listHeaders,
getResponseCookies,
getResponseCookie,
getHeader,
formatHttpTime,
emptyResponse,
deleteResponseCookie,
deleteHeader,
clearContentLength,
addResponseCookie,
addHeader )
import Snap.Internal.Instances ()
import Snap.Internal.Parsing
( urlEncodeBuilder,
urlEncode,
urlDecode,
printUrlEncoded,
parseUrlEncoded,
buildUrlEncoded )
import Snap.Internal.Routing ( routeLocal, route )
import Snap.Internal.Types
( Snap,
NoHandlerException(..),
MonadSnap(..),
EscapeSnap(..),
EscapeHttpHandler,
writeText,
writeLazyText,
writeLBS,
writeBuilder,
writeBS,
withResponse,
withRequest,
transformRequestBody,
terminateConnection,
setTimeout,
sendFilePartial,
sendFile,
runSnap,
runRequestBody,
redirect',
redirect,
readRequestBody,
readCookie,
putResponse,
putRequest,
pathArg,
path,
pass,
modifyTimeout,
modifyResponse,
modifyRequest,
methods,
method,
logError,
localRequest,
ipHeaderFilter',
ipHeaderFilter,
ifTop,
getsResponse,
getsRequest,
getTimeoutModifier,
getResponse,
getRequest,
getQueryParams,
getQueryParam,
getPostParams,
getPostParam,
getParams,
getParam,
getCookie,
finishWith,
extendTimeout,
expireCookie,
escapeHttp,
dir,
catchFinishWith,
bracketSnap,
addToOutput )
import Snap.Types.Headers ( Headers )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment