diff options
author | Cyborus <cyborus@cyborus.xyz> | 2024-01-18 23:48:10 +0100 |
---|---|---|
committer | Cyborus <cyborus@cyborus.xyz> | 2024-01-18 23:53:11 +0100 |
commit | bfb31fc296e3447b16290b8cff1ce5c1deed2e1d (patch) | |
tree | 800df916f9e9e4ac54953ccefea1938db1b2b59d | |
parent | strip leading slash (diff) | |
download | forgejo-api-bfb31fc296e3447b16290b8cff1ce5c1deed2e1d.tar.xz forgejo-api-bfb31fc296e3447b16290b8cff1ce5c1deed2e1d.zip |
add trailing slash to api prefix
-rw-r--r-- | src/lib.rs | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -137,27 +137,27 @@ impl Forgejo { } fn get(&self, path: &str) -> reqwest::RequestBuilder { - let url = self.url.join("api/v1").unwrap().join(path).unwrap(); + let url = self.url.join("api/v1/").unwrap().join(path).unwrap(); self.client.get(url) } fn put(&self, path: &str) -> reqwest::RequestBuilder { - let url = self.url.join("api/v1").unwrap().join(path).unwrap(); + let url = self.url.join("api/v1/").unwrap().join(path).unwrap(); self.client.put(url) } fn post(&self, path: &str) -> reqwest::RequestBuilder { - let url = self.url.join("api/v1").unwrap().join(path).unwrap(); + let url = self.url.join("api/v1/").unwrap().join(path).unwrap(); self.client.post(url) } fn delete(&self, path: &str) -> reqwest::RequestBuilder { - let url = self.url.join("api/v1").unwrap().join(path).unwrap(); + let url = self.url.join("api/v1/").unwrap().join(path).unwrap(); self.client.post(url) } fn patch(&self, path: &str) -> reqwest::RequestBuilder { - let url = self.url.join("api/v1").unwrap().join(path).unwrap(); + let url = self.url.join("api/v1/").unwrap().join(path).unwrap(); self.client.post(url) } |