March Docs

Http

Http module: pure HTTP protocol types, constructors, and transforms.

This is Layer 1 of March's HTTP library. It contains no I/O — only data types and functions for building and inspecting HTTP requests and responses. Libraries that work with HTTP types depend on this alone.

Types

typeMethodMethod = Get | Post | Put | Patch | Delete | Head | Options | Trace | Connect | Other(String)#
typeSchemeScheme = SchemeHttp | SchemeHttps#
typeStatusStatus = Status(Int)#
typeHeaderHeader = Header(String, String)#
typeUrlErrorUrlError = InvalidScheme(String) | MissingHost | InvalidPort(String) | MalformedUrl(String)#
typeRequestRequest(body) = Request(Method, Scheme, String, Option(Int), String, Option(String), List(Header), body)#
typeResponseResponse(body) = Response(Status, List(Header), body)#