webwire-0.1.0: Functional reactive web framework

MaintainerErtugrul Soeylemez <es@ertes.de>

WebWire.Tools

Contents

Description

Various webwire tools.

Synopsis

Requests

getQueryParam :: WebWire site ByteString ByteStringSource

Retrieve the given query parameter. Inhibits with 404, if the parameter does not exist.

Responses

Headers

addHeader :: WebWire site (CI Ascii, Ascii) ()Source

Add an additional header to the response.

Cookies

getCookie :: WebWire site ByteString ByteStringSource

Retrieves the given cookie from the request. Inhibits, if the cookie doesn't exist.

setCookie :: WebWire site SetCookie ()Source

Sets the given cookie.

setCookieSimple :: WebWire site (ByteString, ByteString, Maybe NominalDiffTime) ()Source

Sets the given cookie for the root path of the current domain with the given validity duration. If no duration is given, it becomes a session cookie.

Failure

notFound :: WebWire site a bSource

Inhibits with a 404 error.