Expand description
Async wrapper around cURL for making managing HTTP requests.
Requests are executed in parallel using cURL Multi on
a worker thread that is owned by the Client.
Re-exportsยง
use cargo_util::collections::HashMap;๐use std::io::Cursor;๐use std::io::Read;๐use std::str::FromStr;๐use std::sync::Arc;๐use std::sync::atomic::Ordering;๐use std::sync::mpsc;๐use std::sync::mpsc::Receiver;๐use std::sync::mpsc::Sender;๐use std::thread::JoinHandle;๐use std::time::Duration;๐use std::time::Instant;๐use curl::easy::Easy2;๐use curl::easy::Handler;๐use curl::easy::InfoType;๐use curl::easy::WriteError;๐use curl::multi::Easy2Handle;๐use curl::multi::Multi;๐use futures::channel::oneshot;๐use portable_atomic::AtomicI64;๐use portable_atomic::AtomicU64;๐use tracing::debug;๐use tracing::error;๐use tracing::trace;๐use tracing::warn;๐use crate::util::network::http::HandleConfiguration;๐use crate::util::network::http::HttpTimeout;๐
Structsยง
- Client
- HTTP Client. Creating a new client spawns a cURL
Multiand thread that is used for all HTTP requests by this client. - Collector ๐
- Interface that cURL (
Easy2) uses to make progress. - Extensions ๐
- Additional fields on an [
http::Response]. - Message ๐
- Stats ๐
- Worker
Server ๐ - Manages the cURL
Multi. Processes incoming work sent over the channel, and returns responses.
Enumsยง
Traitsยง
Functionsยง
- handle_
http_ ๐header - Splits HTTP
HEADER: VALUEto a tuple.
Type Aliasesยง
- Http
Result ๐ - Request ๐
- Response ๐