From 005f2ddaeee4b6d2683cf061879d74149c417d67 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Thu, 5 Dec 2024 18:27:25 -0800 Subject: [PATCH] rust api: patch --- validation/api/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/validation/api/src/lib.rs b/validation/api/src/lib.rs index 13548a9..4818124 100644 --- a/validation/api/src/lib.rs +++ b/validation/api/src/lib.rs @@ -77,6 +77,11 @@ impl Context{ self.client.get(url) .send().await } + async fn patch(&self,url:impl reqwest::IntoUrl,body:impl Into)->Result{ + self.client.patch(url) + .body(body) + .send().await + } pub async fn get_script(&self,config:GetScriptRequest)->Result{ let url_raw=format!("{}/scripts/{}",self.base_url,config.ScriptID.0); let url=reqwest::Url::parse(url_raw.as_str()).map_err(GetError::ParseError)?;