servant-fiat-content: Fiat content types

[ deprecated, library, mit, servant, web ] [ Propose Tags ] [ Report a vulnerability ]
Deprecated

Use bytestring or text to deliver content directly


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

  • No current members of group

For package maintainers and hackage trustees

Candidates

Versions [RSS] 1.0.0, 1.0.1
Dependencies base (>=4.7 && <5), bytestring, http-media, servant (>=0.12 && <1), text [details]
License MIT
Copyright 2021 Jappie Klooster
Author Jappie Klooster
Maintainer jappieklooster@hotmail.com
Category Servant, Web
Home page https://github.com/jappeace/servant-fiat-content#readme
Bug tracker https://github.com/jappeace/servant-fiat-content/issues
Source repo head: git clone https://github.com/jappeace/servant-fiat-content
Uploaded by Jappie at 2022-01-08T22:51:45Z
Distributions NixOS:1.0.1
Downloads 678 total (14 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for servant-fiat-content-1.0.1

[back to package description]

[![https://jappieklooster.nl](https://img.shields.io/badge/blog-jappieklooster.nl-lightgrey)](https://jappieklooster.nl/tag/haskell.html) Jappiejappie Githbu actions build status Jappiejappie Hackage version

Servant fiat content

Sometimes you want to have a plain text just be an HTML content type response, for example when you use a reflex to generate HTML, you have to use IO: https://hackage.haskell.org/package/reflex-dom-core-0.4/docs/Reflex-Dom-Builder-Static.html#v:renderStatic

Or a plain text be a Javascript, when you generate javascript clients in servant and want them to always be up to date with the running server (no filesystem BS): http://hackage.haskell.org/package/servant-js-0.9.4/docs/Servant-JS.html#v:jsForAPI

Fear not! we can do this rather trivially, shown by this module.