pub async fn post(
    url: impl AsRef<str>,
    headers: Option<HashMap<String, String>>,
    body: Option<&[u8]>
) -> Result<Vec<u8>, HttpError>
Available on crate feature server only.
Expand description

Sends an HTTP POST request to the given URL, and returns the response body.

Any errors in sending or receiving will be returned as an HttpError.

NOTE: This may be replaced with wasi-http support in the future, which will allow the use of native Rust libraries like reqwest.