[http] Additional methods

This commit is contained in:
Johannes Frohnmeyer 2022-10-22 19:40:47 +02:00
parent f9782a1ef5
commit 97d86d35be
Signed by: Johannes
GPG Key ID: E76429612C2929F4

View File

@ -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);
}
}