Expand description
§Deboa - Core API Documentation
Hello, and welcome to the core Deboa API documentation!
This API documentation is highly technical and is purely a reference.
Depend on deboa in Cargo.toml:
[dependencies]
deboa = "0.1.0"Note that development versions, tagged with -dev, are not published
and need to be specified as [git dependencies].
ⓘ
use deboa::{Client, Result, errors::DeboaError, request::DeboaRequest};
#[tokio::main]
async fn main() -> Result<()> {
let mut client = Client::builder()
.build();
let response = DeboaRequest::get("https://httpbin.org/get")?
.send_with(&mut client)
.await?;
println!("Response: {:#?}", response);
Ok(())
}§Features
To avoid compiling unused dependencies, Deboa feature-gates optional functionality, some enabled by default:
| Feature | Default? | Description |
|---|---|---|
tokio_rt | Yes | Support tokio runtime (enabled by default). |
smol_rt | No | Support smol runtime. |
http1 | No | Support for HTTP/1. |
http2 | Yes | Support for HTTP/2 (enabled by default). |
http3 | No | Support for HTTP/3. |
http3-smol | No | Support for HTTP/3 on Smol. |
tokio-rust-tls | Yes | Support for tokio-rust-tls (enabled by default). |
tokio-native-tls | No | Support for tokio-native-tls. |
smol-rust-tls | No | Support for smol-rust-tls. |
smol-native-tls | No | Support for smol-native-tls. |
Disabled features can be selectively enabled in Cargo.toml:
[dependencies]
deboa = { version = "0.1.0", features = ["tokio_rt", "http2", "tokio-rust-tls"] }Conversely, HTTP/2 can be disabled:
[dependencies]
deboa = { version = "0.1.0", default-features = false }Modules§
- cache
- Caching functionality for the Deboa HTTP client.
- catcher
- This module define the catcher API for Deboa.
- cert
- Client certificate handling for secure connections.
- client
- Core HTTP client implementation for Deboa.
- cookie
- HTTP Cookie handling for the Deboa HTTP client.
- errors
- Error types for the Deboa HTTP client.
- form
- HTTP Form Data Module
- fs
- File System and I/O Module
- request
- HTTP Request Module
- response
- HTTP Response Module
- rt
- Runtime Abstraction Layer
- url
Structs§
- Client
- The main HTTP client for making requests.
- Client
Builder - A builder for configuring and creating a new
Deboaclient instance.
Enums§
- Http
Version - Enum that represents the HTTP version.
Type Aliases§
- Deboa
Deprecated - Deboa
Builder Deprecated - File
- Result
- Type alias for Result<T, DeboaError> Convenience alias for handling Deboa errors throughout the library.