Skip to main content

Crate deboa

Crate deboa 

Source
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:

FeatureDefault?Description
tokio_rtYesSupport tokio runtime (enabled by default).
smol_rtNoSupport smol runtime.
http1NoSupport for HTTP/1.
http2YesSupport for HTTP/2 (enabled by default).
http3NoSupport for HTTP/3.
http3-smolNoSupport for HTTP/3 on Smol.
tokio-rust-tlsYesSupport for tokio-rust-tls (enabled by default).
tokio-native-tlsNoSupport for tokio-native-tls.
smol-rust-tlsNoSupport for smol-rust-tls.
smol-native-tlsNoSupport 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.
ClientBuilder
A builder for configuring and creating a new Deboa client instance.

Enums§

HttpVersion
Enum that represents the HTTP version.

Type Aliases§

DeboaDeprecated
DeboaBuilderDeprecated
File
Result
Type alias for Result<T, DeboaError> Convenience alias for handling Deboa errors throughout the library.

Attribute Macros§

async_trait