Writers Module
Module that allows changing the output response in different ways. Functions have signature f :: params... -> HttpContext -> HttpContext.
Functions and values
| Function or value | Description |
|
Adds the header key with the given value to the list of returned headers, even if that header already exists. This means that Suave will serve a a response with the header denoted by `key` with possibly different values. Also consider `setHeader` and `setHeaderValue` depending on what semantics you'd like. Furthermore, Cookies must be set on separate header lines (using this function) and not comma-concatenated. See https://github.com/SuaveIO/suave/issues/338#issuecomment-156820747 for defails.
|
Full Usage:
createMimeType name compression
Parameters:
string
compression : bool
Returns: MimeType option
|
|
|
|
|
|
|
Ensures that the is unique in the comma-separated list of the response header, denoted by `key`. This is useful for example for the "Vary" header which should at the very minimum include "Accept-Encoding", but may also include "Accept-Language" for multi-lingual sites (see Suave.Locale repo) and "Authorization" and "Cookie" for authorized resources.
|
|
|
|
|
|
|
|