add trailing slash to api prefix
This commit is contained in:
parent
ec3a9e74c4
commit
bfb31fc296
10
src/lib.rs
10
src/lib.rs
|
@ -137,27 +137,27 @@ impl Forgejo {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get(&self, path: &str) -> reqwest::RequestBuilder {
|
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)
|
self.client.get(url)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn put(&self, path: &str) -> reqwest::RequestBuilder {
|
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)
|
self.client.put(url)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn post(&self, path: &str) -> reqwest::RequestBuilder {
|
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)
|
self.client.post(url)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn delete(&self, path: &str) -> reqwest::RequestBuilder {
|
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)
|
self.client.post(url)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn patch(&self, path: &str) -> reqwest::RequestBuilder {
|
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)
|
self.client.post(url)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue