algesten/ureq ↗
Created Dec 22, 2020 · View the algesten/ureq repository page
A simple, safe HTTP client
Want this for your repo?
Render a free sample of any GitHub repo in seconds.
Contributors
31
Lines of Code
1,125
From
Dec 10, 2017
To
Dec 19, 2020
About algesten/ureq
Ureq is a lightweight HTTP client library written in pure Rust that prioritizes simplicity and safety. It uses blocking I/O rather than async operations, keeping the API straightforward and minimizing dependencies. The library includes built-in support for cookies, JSON serialization, HTTP proxies, HTTPS with configurable TLS backends, and automatic charset decoding. It forbids unsafe code entirely and is based on the API design of the http crate.
The project is designed to work well with HTTP APIs and is particularly suited for applications that don't require the complexity of async networking. Ureq supports multiple TLS implementations through rustls or native-tls, allows configuration of root certificate verification through either Mozilla's webpki-roots or platform-specific verifiers, and can handle various proxy types including HTTP CONNECT tunneling and SOCKS4/5 proxies. The library intelligently handles request bodies using either Content-Length or chunked transfer encoding depending on the data type.
Ureq provides extensive configurability through optional features like gzip and brotli compression, multipart form data, and character set support beyond UTF-8. An Agent type allows connection pooling and cookie store management, and can be cheaply cloned due to internal Arc usage. The project maintains semantic versioning with clear documentation about minimum supported Rust versions and stability guarantees for unstable APIs, addressing concerns about non-semver dependencies like rustls by providing wrapper types and using an "unversioned" module for experimental features.