use std::error::Error;
use serde_json::Value;
impl super::Client {
pub async fn post_dataset_json(
&self,
url: &str,
obj: Value,
) -> Result<(), Box<dyn Error + Send + Sync + 'static>> {
surf::post(url.to_string())
.body(surf::Body::from_json(&obj)?)
.await?;
Ok(())
}
}