bimp-net
bimp-net is a small Rust wrapper around libcurl-impersonate. It exposes an
HTTP client that uses curl_easy_impersonate for browser-like TLS and HTTP
transport while returning standard http responses and hyper body streams.
Requirements
Install libcurl-impersonate before building. The build script looks in
/usr/local/lib for one of:
libcurl-impersonate.dyliblibcurl-impersonate.solibcurl-impersonate.a
The command-line curl-impersonate wrapper alone is not enough; the linked
library must export curl_easy_impersonate.
Collected Responses
Use send_collect for small responses that can be buffered in memory.
use ;
use ;
Streaming Responses
Use send when the caller should consume the response body incrementally.
use ;
use Request;
use ;
use Bytes;
async
Configuration
Config::default() uses the chrome136 impersonation target, 10 second
connect timeout, 30 second request timeout, no redirect following, and
libcurl-impersonate default headers enabled.
Set default_headers to false if you want to provide all request headers
yourself. When decoded response bodies are returned, content-encoding,
content-length, and transfer-encoding headers are removed because they no
longer describe the body bytes delivered to Rust.