Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

HttpClient – HTTP Client

Lean: Hale.HttpClient | Haskell: http-client

HTTP client with pluggable transport. Connection abstracts plain TCP and TLS uniformly.

Key Types

TypeDescription
ConnectionRecord with read/write/close callbacks
RequestSerializable HTTP request
ResponseParsed status, headers, body

API

FunctionDescription
connectionFromSocketTCP connection builder
connectionFromTLSTLS connection builder

Modules

  • Types – Core types
  • Connection – Transport abstraction
  • Request – Request building and serialization
  • Response – Response parsing
  • Redirect – Redirect following

Files

  • Hale/HttpClient/Network/HTTP/Client/Types.lean – Connection, Request, Response
  • Hale/HttpClient/Network/HTTP/Client/Connection.lean – Transport
  • Hale/HttpClient/Network/HTTP/Client/Request.lean – Request
  • Hale/HttpClient/Network/HTTP/Client/Response.lean – Response
  • Hale/HttpClient/Network/HTTP/Client/Redirect.lean – Redirects