From 97d86d35bebe47e4e15854789bc8875568e85d31 Mon Sep 17 00:00:00 2001 From: JFronny Date: Sat, 22 Oct 2022 19:40:47 +0200 Subject: [PATCH] [http] Additional methods --- .../io/gitlab/jfronny/commons/HttpUtils.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/gitlab/jfronny/commons/HttpUtils.java b/src/main/java/io/gitlab/jfronny/commons/HttpUtils.java index 4599f44..0f794fe 100644 --- a/src/main/java/io/gitlab/jfronny/commons/HttpUtils.java +++ b/src/main/java/io/gitlab/jfronny/commons/HttpUtils.java @@ -56,7 +56,10 @@ public class HttpUtils { private enum Method { GET, - POST + POST, + PUT, + PATCH, + DELETE } public static class Request { @@ -201,4 +204,16 @@ public class HttpUtils { public static Request post(String url) throws URISyntaxException { return new Request(Method.POST, url); } + + public static Request put(String url) throws URISyntaxException { + return new Request(Method.PUT, url); + } + + public static Request patch(String url) throws URISyntaxException { + return new Request(Method.PATCH, url); + } + + public static Request delete(String url) throws URISyntaxException { + return new Request(Method.DELETE, url); + } }