# http-media

> Haskell library for parsing and matching HTTP Accept and Content-Type headers

Source: https://talira.ai/catalog/http-media-qjc0648z
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / http types](https://talira.ai/categories/libraries/http-types), [languages / haskell](https://talira.ai/categories/languages/haskell)
- Licence: MIT[^2]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [Timothy Jones](https://talira.ai/orgs/timothy-jones-zmthy.md)

http-media is a Haskell library for parsing quality-indexed values in HTTP headers and choosing among them. It parses media types and language parameters from the Accept and Content header families, then matches a list of the server's options against the client's quality values: `mapAcceptMedia` picks what to send for an Accept header, and `mapContentMedia` picks a request body parser for a Content-Type. It can be extended to other Accept headers, and it works with any web server.

## Links

- GitHub: https://github.com/zmthy/http-media

## Problems it solves

- content negotiation on the Accept header in a Haskell web app
- pick a request body parser from the Content-Type in Haskell
- serve JSON or HTML depending on what the client asks for

## Features

- parses media types and languages from Accept and Content headers
- matches server options against the client's quality values
- extensible to other Accept headers
- agnostic to the web server

## Trust

Overall: 0.30 out of 1.
Signals: maintenance 0.45, adoption 0.24, momentum 0.01, community 0.45, backing 0.30, extensibility 0.00.

- last commit 3 months ago
- latest release v0.8.1.1 3.2 years ago
- 14 GitHub stars
- 12 contributors
- backed by Timothy Jones

## Sources

[^1]: https://github.com/zmthy/http-media/blob/develop/README.md (checked 28 Nov 2026)
[^2]: https://github.com/zmthy/http-media/blob/develop/LICENSE (checked 28 Nov 2026)
