Function post
Source pub async fn post(
url: impl AsRef<str>,
body: impl Into<Bytes>,
) -> Result<Response, ErrorCode>
Available on crate feature http only.
Expand description
Sends a POST request with the given body.
The body can be any type that implements Into<bytes::Bytes>, such as
String, Vec<u8>, &'static str, or bytes::Bytes.
§Examples
ⓘlet resp = spin_sdk::http::post("https://example.com/api", "hello").await?;