http-interchange: Types and serialization for HTTP

[ bsd3, data, library ] [ Propose Tags ]

Types and serialization for HTTP. This includes things like request line, status line, and headers. There is also a collection type for headers that supports fast, case-insensitive lookup.

[Skip to Readme]


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS],,,,,
Change log
Dependencies base (>= && <5), bytebuild (>=0.3.10), byteslice (>=0.2.11), bytesmith (>=0.3.10), contiguous (>=0.6.3), primitive (>=0.9.0), text (>=2.0) [details]
License BSD-3-Clause
Copyright 2023 Andrew Martin
Author Andrew Martin
Category Data
Home page
Bug tracker
Source repo head: git clone git://
Uploaded by l3c_amartin at 2024-02-07T20:44:22Z
Reverse Dependencies 2 direct, 0 indirect [details]
Downloads 185 total (10 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2024-02-07 [all 1 reports]

Readme for http-interchange-

[back to package description]


Types, encode functions, and decode functions for HTTP requests and responses. This is similar in spirit to http-types, but it differs in these ways:

  • This library includes encoders and decoders for the parts of a request/response leading up to the body (but not including the body).
  • This library does not have use types from case-insensitive.
  • This library defines data types instead of aliasing tuples. For example, Header in http-types is defined as type Header = (HeaderName, ByteString). Here, it is defined as data Header = Header {...}.

This library aims to provide just enough common functionality that someone could build an HTTP client on top of it. Things that are not goals:

  • This library does not use network sockets.

Other notable design decisions:

  • This library tries to follow RFC 7230. Response header values are restricted to the subset of visible ASCII characters (plus space and tab). This is enforced by the decoders but not by the encoders.