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:
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.5", features = ["tokio_rt", "http1", "http2"] }
Conversely, HTTP/2 can be disabled:
[dependencies]
deboa = { version = "0.0.5", default-features = false }
Modules§
Structs§
- Deboa
- Struct that represents the Deboa instance.
- Deboa
Builder - Struct that represents the Deboa builder.
Enums§
- Http
Version - Enum that represents the HTTP version.