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.0.5"

Note that development versions, tagged with -dev, are not published and need to be specified as [git dependencies].

use deboa::{Deboa, errors::DeboaError, request::DeboaRequest};

#[tokio::main]
async fn main() -> Result<(), DeboaError> {
    let deboa = Deboa::builder()
        .build();

    let response = DeboaRequest::get("https://httpbin.org/get")?
        .go(deboa)
        .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.
http1YesSupport for HTTP/1 (enabled by default).
http2YesSupport for HTTP/2 (enabled by default).

Disabled features can be selectively enabled in Cargo.toml:

[dependencies]
deboa = { version = "0.0.5", features = ["tokio_rt", "http1", "http2"] }

Conversely, HTTP/2 can be disabled:

[dependencies]
deboa = { version = "0.0.5", default-features = false }

Modules§

cache
catcher
client
cookie
errors
fs
request
response

Structs§

Deboa
Struct that represents the Deboa instance.
DeboaBuilder
Struct that represents the Deboa builder.

Enums§

HttpVersion
Enum that represents the HTTP version.