http-interchange: Types and serialization for HTTP

[ bsd3, data, library ] [ Propose Tags ] [ Report a vulnerability ]

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]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.2.0.0, 0.3.0.0, 0.3.1.0, 0.3.2.0, 0.3.2.1, 0.3.2.2
Change log CHANGELOG.md
Dependencies base (>=4.16.3.0 && <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]
Tested with ghc ==9.4.8 || ==9.6.3 || ==9.8.1
License BSD-3-Clause
Copyright 2023 Andrew Martin
Author Andrew Martin
Maintainer amartin@layer3com.com
Category Data
Home page https://github.com/byteverse/http-interchange
Bug tracker https://github.com/byteverse/http-interchange/issues
Source repo head: git clone git://github.com/byteverse/http-interchange.git
Uploaded by andrewthad at 2024-08-23T17:22:43Z
Distributions
Reverse Dependencies 2 direct, 0 indirect [details]
Downloads 294 total (19 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-08-23 [all 1 reports]

Readme for http-interchange-0.3.2.2

[back to package description]

http-interchange

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.