Clean up request method calls

This commit is contained in:
Liam Newman
2019-12-16 11:18:56 -08:00
parent 0f9482864c
commit 40f05e4dbb
28 changed files with 66 additions and 107 deletions

View File

@@ -176,13 +176,7 @@ public class GHProject extends GHObject {
}
private void edit(String key, Object value) throws IOException {
root.retrieve()
.method("POST")
.withPreview(INERTIA)
.with(key, value)
.method("PATCH")
.withUrlPath(getApiRoute())
.to();
root.retrieve().method("PATCH").withPreview(INERTIA).with(key, value).withUrlPath(getApiRoute()).to();
}
/**
@@ -276,7 +270,7 @@ public class GHProject extends GHObject {
* the io exception
*/
public void delete() throws IOException {
root.retrieve().method("POST").withPreview(INERTIA).method("DELETE").withUrlPath(getApiRoute()).to();
root.retrieve().withPreview(INERTIA).method("DELETE").withUrlPath(getApiRoute()).to();
}
/**