name:                 http-media
version:              0.8.1.1
visibility:           public
id:                   http-media-0.8.1.1-B1kkquzcsUQG3WSG0z9lad
key:                  http-media-0.8.1.1-B1kkquzcsUQG3WSG0z9lad
license:              MIT
copyright:            (c) 2012-2023 Timothy Jones
maintainer:           Timothy Jones <tim@zmthy.net>
author:               Timothy Jones
homepage:             https://github.com/zmthy/http-media
synopsis:             Processing HTTP Content-Type and Accept headers
description:
    This library is intended to be a comprehensive solution to parsing and
    selecting quality-indexed values in HTTP headers.  It is capable of
    parsing both media types and language parameters from the Accept and
    Content header families, and can be extended to match against other
    accept headers as well.  Selecting the appropriate header value is
    achieved by comparing a list of server options against the
    quality-indexed values supplied by the client.

    In the following example, the Accept header is parsed and then matched
    against a list of server options to serve the appropriate media using
    'mapAcceptMedia':

    > getHeader >>= maybe send406Error sendResourceWith . mapAcceptMedia
    >     [ ("text/html",        asHtml)
    >     , ("application/json", asJson)
    >     ]

    Similarly, the Content-Type header can be used to produce a parser for
    request bodies based on the given content type with 'mapContentMedia':

    > getContentType >>= maybe send415Error readRequestBodyWith . mapContentMedia
    >     [ ("application/json", parseJson)
    >     , ("text/plain",       parseText)
    >     ]

    The API is agnostic to your choice of server.

category:             Web
abi:                  dce9983934efc306034beab2570f327a
exposed:              True
exposed-modules:
    Network.HTTP.Media Network.HTTP.Media.Accept
    Network.HTTP.Media.Charset Network.HTTP.Media.Encoding
    Network.HTTP.Media.Language Network.HTTP.Media.MediaType
    Network.HTTP.Media.RenderHeader

hidden-modules:
    Network.HTTP.Media.Charset.Internal
    Network.HTTP.Media.Encoding.Internal
    Network.HTTP.Media.Language.Internal
    Network.HTTP.Media.MediaType.Internal Network.HTTP.Media.Quality
    Network.HTTP.Media.Utils

import-dirs:
    /usr/pkg/lib/aarch64-netbsd-ghc-9.10.1/http-media-0.8.1.1-B1kkquzcsUQG3WSG0z9lad

library-dirs:
    /usr/pkg/lib/aarch64-netbsd-ghc-9.10.1/http-media-0.8.1.1-B1kkquzcsUQG3WSG0z9lad

library-dirs-static:
    /usr/pkg/lib/aarch64-netbsd-ghc-9.10.1/http-media-0.8.1.1-B1kkquzcsUQG3WSG0z9lad

dynamic-library-dirs: /usr/pkg/lib/aarch64-netbsd-ghc-9.10.1
data-dir:             /usr/pkg/share/aarch64-netbsd-ghc-9.10.1/http-media-0.8.1.1
hs-libraries:         HShttp-media-0.8.1.1-B1kkquzcsUQG3WSG0z9lad
depends:
    base-4.20.0.0-inplace bytestring-0.12.1.0-inplace
    case-insensitive-1.2.1.0-FcBOJwTLcBrEdHrSFt3rYl
    containers-0.7-inplace utf8-string-1.0.2-1XncvugNvmEUe6szfkLY0

haddock-interfaces:
    /usr/pkg/share/doc/aarch64-netbsd-ghc-9.10.1/http-media-0.8.1.1/html/http-media.haddock

haddock-html:
    /usr/pkg/share/doc/aarch64-netbsd-ghc-9.10.1/http-media-0.8.1.1/html
