| CARVIEW |
cookie-tray: For serving cookies
This package aims to make it easy to set cookies from your web server, even if you are not intimately familiar with the details of the Set-Cookie HTTP field.
[Skip to Readme]
Modules
[Index] [Quick Jump]
Downloads
- cookie-tray-0.0.0.1.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
| Versions [RSS] | 0.0.0.0, 0.0.0.1 |
|---|---|
| Change log | changelog.md |
| Dependencies | base (>=4.18 && <4.20), binary (>=0.8.9 && <0.9), bytestring (>=0.11.4 && <0.13), containers (>=0.6.5 && <0.7), cookie (>=0.4.6 && <0.5), time (>=1.11.1 && <1.13) [details] |
| License | Apache-2.0 |
| Author | Chris Martin |
| Maintainer | Chris Martin, Julie Moronuki |
| Uploaded | by chris_martin at 2025-01-21T00:52:32Z |
| Category | Web |
| Home page | https://github.com/typeclasses/cookie-tray |
| Distributions | |
| Downloads | 128 total (6 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating |
|
| Status | Docs available [build log] Last success reported on 2025-01-21 [all 1 reports] |
Readme for cookie-tray-0.0.0.1
[back to package description]The cookie-tray package aims to make it easy to set cookies from your web
server, even if you are not intimately familiar with the details of the
Set-Cookie HTTP field.
One example of a higher-level abstraction provided by this library is the idea
of cookie deletion. The low-level specification gives no way to explicitly
instruct a client to unset a cookie. This library provides a Delete action
that does the right thing (sets the cookie with an expiration date in the past)
to achieve removal.
Currently the best way to see how the library is used is to look at the test suite.
I currently consider the API to be "experimental" because I don't think its chief goals of being convenient and instructive have been satisfied confidently enough to consider the library "finished." I am open to accepting improvements to make the library more convenient to use.
This package works nicely in conjunction with wai and warp. See mapResponseHeaders in WAI for how to apply fields to the response header.
I am not sure how one would use this with scotty, as you may be thwarted by
Scotty's use of Text instead of ByteString to represent HTTP fields.
Reference documentation on cookies: