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§
Structs§
- Body
- The request body to be sent with a
Request. - Error
- Errors returned by this crate.
- Invalid
Method - Method
- An HTTP method.
- Request
- An HTTP request. Use a
RequestBuilderto build one. - Request
Builder - A builder for a
Request. Use one of the methods onSessionExtto start a builder. - Response
- An HTTP response including its body.
Traits§
- IntoUri
- Types that can be converted to a
glib::Uri. - Session
Ext
Type Aliases§
- Result
- Result returned by this crate.