servant-static-th-0.2.2.1: Embed a directory of static files in your Servant server

CopyrightDennis Gosnell 2017
LicenseBSD3
MaintainerDennis Gosnell (cdep.illabout@gmail.com)
Stabilityexperimental
Portabilityunknown
Safe HaskellNone
LanguageHaskell2010

Servant.Static.TH.Internal.Mime

Description

This module exports functions and datatypes for using many different mime types.

Synopsis

Documentation

data MimeTypeInfo Source #

Hold Types and functions work working with a given file type, like html or js.

You can find examples of MimeTypeInfo in the function extensionMimeTypeMap.

Constructors

MimeTypeInfo 

Fields

extensionMimeTypeMap :: Map String MimeTypeInfo Source #

A mapping from an extension like html or js to a MimeTypeInfo for that extension.

extensionToMimeTypeInfoEx :: FilePath -> Q MimeTypeInfo Source #

Just like extensionToMimeTypeInfo, but throw an error using fail if the extension for the given FilePath is not found.

extensionToMimeTypeInfo :: FilePath -> Maybe MimeTypeInfo Source #

Lookup the MimeTypeInfo for a given FilePath (that has an extension like .html or .js). Returns Nothing if the MimeTypeInfo for the given extension is not found.

data ICO Source #

Since: 0.2.0.0

data JS Source #

Instances
Accept JS Source #
application/javascript
Instance details

Defined in Servant.Static.TH.Internal.Mime

MimeRender JS ByteString Source # 
Instance details

Defined in Servant.Static.TH.Internal.Mime

data EOT Source #

Since: 0.2.0.0

data TTF Source #

Since: 0.2.0.0

data WOFF Source #

Since: 0.2.0.0

data JSON Source #

JSON file

data XML Source #

XML file

data GEXF Source #

GEXF file (xml for graph application)