servant-fiat-content: Fiat content types

[ library, mit, servant, web ] [ Propose Tags ]

Use bytestring or text to deliver content directly


[Skip to Readme]
Versions [faq] 1.0.0
Dependencies base (>=4.7 && <5), bytestring, http-media, servant (>=0.12 && <0.17), text [details]
License MIT
Copyright 2019 Jappie Klooster
Author Jappie Klooster
Maintainer jappieklooster@hotmail.com
Category Servant, Web
Home page https://github.com/jappeace/template#readme
Bug tracker https://github.com/jappeace/template/issues
Source repo head: git clone https://github.com/jappeace/template
Uploaded by Jappie at Wed Apr 10 16:07:22 UTC 2019
Distributions NixOS:1.0.0
Downloads 92 total (12 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2019-04-10 [all 1 reports]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for servant-fiat-content-1.0.0

[back to package description]

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.