Change requester to GET by default

This commit is contained in:
Liam Newman
2019-11-25 18:05:18 -08:00
parent 1b55b5fa3c
commit 3296cef02d
47 changed files with 252 additions and 180 deletions

View File

@@ -108,7 +108,7 @@ public class GHIssueComment extends GHObject implements Reactable {
* the io exception
*/
public void update(String body) throws IOException {
new Requester(owner.root).with("body", body).method("PATCH").to(getApiRoute(), GHIssueComment.class);
owner.root.retrieve().method("POST").with("body", body).method("PATCH").to(getApiRoute(), GHIssueComment.class);
this.body = body;
}
@@ -119,13 +119,15 @@ public class GHIssueComment extends GHObject implements Reactable {
* the io exception
*/
public void delete() throws IOException {
new Requester(owner.root).method("DELETE").to(getApiRoute());
owner.root.retrieve().method("DELETE").to(getApiRoute());
}
@Preview
@Deprecated
public GHReaction createReaction(ReactionContent content) throws IOException {
return new Requester(owner.root).withPreview(SQUIRREL_GIRL)
return owner.root.retrieve()
.method("POST")
.withPreview(SQUIRREL_GIRL)
.with("content", content.getContent())
.to(getApiRoute() + "/reactions", GHReaction.class)
.wrap(owner.root);