Skip to main content

Module http_async

Module http_async 

Source
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 Multi and 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 ๐Ÿ”’
WorkerServer ๐Ÿ”’
Manages the cURL Multi. Processes incoming work sent over the channel, and returns responses.

Enumsยง

Error

Traitsยง

ResponsePartsExtensions

Functionsยง

handle_http_header ๐Ÿ”’
Splits HTTP HEADER: VALUE to a tuple.

Type Aliasesยง

HttpResult ๐Ÿ”’
Request ๐Ÿ”’
Response ๐Ÿ”’