talira

http-api-data

Convert Haskell types to and from URL pieces, headers and query parameters

open sourceBSD-2-Clausefree

http-api-data is a Haskell library of typeclasses for converting data types to and from HTTP API data: URL path pieces, query parameters and headers. It provides instances for common types such as booleans, numbers, text and calendar days, with parse functions that return readable errors when a value doesn't fit.

Problems it solves

  • turn a Haskell value into a URL query parameter and back
  • parse HTTP headers into Haskell types with readable errors
  • share URL serialization code between a Haskell web server and client

Features

  • typeclasses for URL pieces, query parameters and headers
  • instances for booleans, numbers, strings, text and calendar days
  • parse functions that report why a value couldn't be parsed

Alternatives

The same job

These do what http-api-data does.

  1. http-media Haskell library for parsing and matching HTTP Accept and Content-Type headers

Compare http-api-data with the top 3