use crate::{HttpClient, HttpError};
use futures::Stream;
pub async fn create_error_unary(
client: &HttpClient,
mut params: super::request::ErrorCreateParams,
) -> Result<super::response::ErrorResponse, HttpError> {
params.stream = None;
client
.send_unary(reqwest::Method::POST, "error", Some(params))
.await
}
pub async fn create_error_streaming(
client: &HttpClient,
mut params: super::request::ErrorCreateParams,
) -> Result<
impl Stream<Item = Result<super::response::ErrorResponse, HttpError>> + Send + 'static + use<>,
HttpError,
> {
params.stream = Some(true);
client
.send_streaming(reqwest::Method::POST, "error", Some(params))
.await
}