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.0.8"Note that development versions, tagged with -dev, are not published
and need to be specified as [git dependencies].
use deboa::{Deboa, Result, errors::DeboaError, request::DeboaRequest};
#[tokio::main]
async fn main() -> Result<()> {
let mut deboa = Deboa::builder()
.build();
let response = DeboaRequest::get("https://httpbin.org/get")?
.send_with(&mut deboa)
.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 | Yes | Support for HTTP/1 (enabled by default). |
http2 | Yes | Support for HTTP/2 (enabled by default). |
Disabled features can be selectively enabled in Cargo.toml:
[dependencies]
deboa = { version = "0.0.8", features = ["tokio_rt", "http1", "http2"] }Conversely, HTTP/2 can be disabled:
[dependencies]
deboa = { version = "0.0.8", default-features = false }Modules§
- cache
- Caching functionality for the Deboa HTTP client.
- catcher
- cert
- Client certificate handling for secure connections.
- client
- 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§
- Deboa
- The main HTTP client for making requests.
- Deboa
Builder - A builder for configuring and creating a new
Deboaclient instance.
Enums§
- Http
Version - Enum that represents the HTTP version.