#![forbid(unsafe_op_in_unsafe_fn)]
pub mod aio;
mod cancel;
mod error;
mod url;
mod idn;
#[cfg(not(target_arch = "wasm32"))]
mod compress;
#[cfg(not(target_arch = "wasm32"))]
mod cookie;
#[cfg(not(target_arch = "wasm32"))]
mod digest;
#[cfg(not(target_arch = "wasm32"))]
pub mod download;
#[cfg(not(target_arch = "wasm32"))]
mod http;
#[cfg(not(target_arch = "wasm32"))]
mod io;
#[cfg(not(target_arch = "wasm32"))]
pub mod multi;
#[cfg(not(target_arch = "wasm32"))]
pub mod pool;
#[cfg(not(target_arch = "wasm32"))]
mod proto;
#[cfg(not(target_arch = "wasm32"))]
pub mod resume;
#[cfg(not(target_arch = "wasm32"))]
mod sigv4;
#[cfg(not(target_arch = "wasm32"))]
mod smtp;
#[cfg(not(target_arch = "wasm32"))]
mod telnet;
#[cfg(not(target_arch = "wasm32"))]
mod transfer;
#[cfg(all(test, not(target_arch = "wasm32")))]
mod test_support;
#[cfg(not(target_arch = "wasm32"))]
pub mod net;
#[cfg(not(target_arch = "wasm32"))]
pub mod tls;
#[cfg(all(feature = "bittorrent", not(target_arch = "wasm32")))]
pub mod bittorrent;
#[cfg(not(target_arch = "wasm32"))]
pub mod dict;
#[cfg(not(target_arch = "wasm32"))]
pub mod file;
#[cfg(not(target_arch = "wasm32"))]
pub mod ftp;
#[cfg(not(target_arch = "wasm32"))]
pub mod gopher;
#[cfg(not(target_arch = "wasm32"))]
pub mod http2;
#[cfg(not(target_arch = "wasm32"))]
pub mod http3;
#[cfg(not(target_arch = "wasm32"))]
pub mod imap;
#[cfg(not(target_arch = "wasm32"))]
pub mod ldap;
#[cfg(not(target_arch = "wasm32"))]
pub mod mqtt;
#[cfg(not(target_arch = "wasm32"))]
pub mod pop3;
#[cfg(not(target_arch = "wasm32"))]
pub mod rtsp;
#[cfg(all(feature = "ssh", not(target_arch = "wasm32")))]
pub mod ssh;
#[cfg(not(target_arch = "wasm32"))]
pub mod tftp;
#[cfg(not(target_arch = "wasm32"))]
pub mod websocket;
#[cfg(all(feature = "ffi", not(target_arch = "wasm32")))]
pub mod ffi;
pub use crate::cancel::CancelToken;
pub use crate::error::{Error, Result};
pub use crate::url::Url;
#[cfg(not(target_arch = "wasm32"))]
pub use crate::cookie::{Cookie, CookieJar, SameSite};
#[cfg(not(target_arch = "wasm32"))]
pub use crate::download::{download, fetch_to_file, DownloadOptions, DownloadOutcome};
#[cfg(not(target_arch = "wasm32"))]
pub use crate::http::{
send_multiplexed, send_multiplexed_traced, BodyReader, HttpVersionPref, Priority, ProxyConfig,
Request, Response, ResponseHead, Timing, TlsInfo,
};
#[cfg(not(target_arch = "wasm32"))]
pub use crate::multi::{EasyId, Multi};
#[cfg(not(target_arch = "wasm32"))]
pub use crate::net::Client;
#[cfg(not(target_arch = "wasm32"))]
pub use crate::transfer::{transfer, transfer_url};
#[cfg(not(target_arch = "wasm32"))]
pub use crate::websocket::{
WebSocket, WsClose, WsEvent, WsFrame, WsMessage, WsOpcode, WsReader, WsShutdown, WsWriter,
};
#[cfg(not(target_arch = "wasm32"))]
pub fn get<U: AsRef<str>>(url: U) -> Result<Response> {
Request::get(url.as_ref())?.send()
}
#[cfg(not(target_arch = "wasm32"))]
pub fn request<U: AsRef<str>>(method: &str, url: U) -> Result<Response> {
Request::new(method, url.as_ref())?.send()
}