Crate bouillon

Crate bouillon 

Source
Expand description

A thin wrapper around soup providing an easy, fluent API for sending HTTP requests.

The API an adaptation of the awesome reqwest crate.

§Example

use soup::{Session, prelude::*};
use bouillon::SessionExt as _;

let session = Session::new();
session.set_user_agent("buillon-example");
let robots_txt = session
    .get("https://httpbin.org/robots.txt")
    .send()
    .await?
    .error_for_status()?
    .text()
    .await?;
print!("{robots_txt}");

Re-exports§

pub use soup;
pub use soup::gio;
pub use soup::glib;

Structs§

Body
The request body to be sent with a Request.
Error
Errors returned by this crate.
InvalidMethod
Method
An HTTP method.
Request
An HTTP request. Use a RequestBuilder to build one.
RequestBuilder
A builder for a Request. Use one of the methods on SessionExt to start a builder.
Response
An HTTP response including its body.

Traits§

IntoUri
Types that can be converted to a glib::Uri.
SessionExt

Type Aliases§

Result
Result returned by this crate.