From 6f5f95dc23d11109c0923ca10fbc6f3165472e63 Mon Sep 17 00:00:00 2001 From: Cyborus Date: Fri, 17 Nov 2023 13:31:36 -0500 Subject: add release functionality --- src/lib.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index de92123..39abdaa 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -95,6 +95,16 @@ impl Forgejo { self.execute(request).await } + async fn post_form( + &self, + path: &str, + body: &T, + ) -> Result { + let url = self.url.join("api/v1/").unwrap().join(path).unwrap(); + let request = self.client.post(url).form(body).build()?; + self.execute(request).await + } + async fn delete(&self, path: &str) -> Result<(), ForgejoError> { let url = self.url.join("api/v1/").unwrap().join(path).unwrap(); let request = self.client.delete(url).build()?; -- cgit v1.2.3