talira

The practical HTTP client that is fun to use.

open sourceMITself-hostablefree

Isahc (pronounced like Isaac) is an HTTP client for Rust that uses libcurl as its engine, through the curl crate, and puts an idiomatic API on top. It offers both a synchronous API and a runtime-agnostic async API, built on curl's multi interface, with HTTP/1.1 and HTTP/2, connection multiplexing, configurable timeouts and redirect policies, Unix sockets, sessions with cookie persistence and cancellation on drop. Requests and responses use the http crate's types. Stephen Coakley (sagebind) maintains it, marked passively maintained; reqwest, hyper and ureq are the pure-Rust alternatives.

Problems it solves

  • use curl's battle-tested HTTP handling from Rust with an idiomatic API
  • an async HTTP client in Rust that doesn't tie me to Tokio
  • make both blocking and async HTTP requests in Rust with one crate
  • send Rust HTTP requests over a Unix domain socket
  • keep cookies across requests in a Rust HTTP session
  • cancel an in-flight Rust HTTP request just by dropping it

Features

  • HTTP/1.1 and HTTP/2
  • synchronous API and runtime-agnostic async API
  • connection multiplexing, incremental body reading and writing
  • configurable timeouts and redirect policies
  • Unix sockets
  • sessions and cookie persistence
  • cancellation on drop
  • http crate request and response types
  • optional JSON and cookie features

Limitations

  • Doesn't compile to WebAssembly: the README says it probably won't work for WASM projects1
  • Doesn't suit apps where tiny binary size matters: its async core adds size, and the README suggests ureq1
  • Doesn't support protocols other than HTTP: other protocols are a stated non-goal1

Capabilities

Has an APIplan not known

Alternatives

The same job

These do what Isahc does.

  1. reqwest An ergonomic, batteries-included HTTP Client for Rust.
  2. ureq A simple, safe HTTP client
  3. hyper A protective and efficient HTTP library for all.

Compare Isahc with the top 3