emilk/ehttp

Minimal Rust HTTP client for both native and WASM

393

stars

67

commits

Rust

primary language

Sep 7, 2026

updated

README

ehttp: a minimal Rust HTTP client for both native and WASM

Latest version Documentation unsafe forbidden Build Status MIT Apache

If you want to do HTTP requests and are targeting both native, web (WASM) and NodeJS (since v18.0), then this is the crate for you!

You can try the web demo here (works in any browser with WASM and WebGL support). Uses eframe.

Usage

let request = ehttp::Request::get("https://www.example.com");
ehttp::fetch(request, move |result: ehttp::Result<ehttp::Response>| {
    println!("Status code: {:?}", result.unwrap().status);
});

The given callback is called when the request is completed. You can communicate the results back to the main thread using something like:

There is also a streaming version under ehttp::fetch::streaming, hidden behind the streaming feature flag.

Contributors

emilk

50 commits

jprochazk

4 commits

sebdotv

2 commits

JustFrederik

2 commits

emilk/ehttp

Minimal Rust HTTP client for both native and WASM

393

stars

67

commits

Rust

primary language

Sep 7, 2026

updated

README

ehttp: a minimal Rust HTTP client for both native and WASM

Latest version Documentation unsafe forbidden Build Status MIT Apache

If you want to do HTTP requests and are targeting both native, web (WASM) and NodeJS (since v18.0), then this is the crate for you!

You can try the web demo here (works in any browser with WASM and WebGL support). Uses eframe.

Usage

let request = ehttp::Request::get("https://www.example.com");
ehttp::fetch(request, move |result: ehttp::Result<ehttp::Response>| {
    println!("Status code: {:?}", result.unwrap().status);
});

The given callback is called when the request is completed. You can communicate the results back to the main thread using something like:

There is also a streaming version under ehttp::fetch::streaming, hidden behind the streaming feature flag.

Contributors

emilk

50 commits

jprochazk

4 commits

sebdotv

2 commits

JustFrederik

2 commits

Languages

Rust

83.5%

Shell

8.5%

HTML

8.0%