Skip to content

Commit 5c47220

Browse files
committed
Add PUT & DELETE support to AppManager.
1 parent b3cb79c commit 5c47220

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

src/main/java/fr/rabian/ovhApi/AppManager.java

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,18 @@ public String sendGetReq(String path, Consumer c) throws Exception {
8989
return sendReq(path, "GET", c, "");
9090
}
9191

92+
/**
93+
* Carries out a DELETE request.
94+
*
95+
* @param path Path to the function
96+
* @param c Consumer concerned
97+
* @return Response body
98+
* @throws Exception Occuring during the request
99+
*/
100+
public String sendDeleteReq(String path, Consumer c) throws Exception {
101+
return sendReq(path, "DELETE", c, "");
102+
}
103+
92104
/**
93105
* Carries out a POST request.
94106
*
@@ -102,6 +114,19 @@ public String sendPostReq(String path, Consumer c, String body) throws Exception
102114
return sendReq(path, "POST", c, body);
103115
}
104116

117+
/**
118+
* Carries out a PUT request.
119+
*
120+
* @param path Path to the function
121+
* @param c Consumer concerned
122+
* @param body Request body
123+
* @return Response body
124+
* @throws Exception Occuring during the request
125+
*/
126+
public String sendPutReq(String path, Consumer c, String body) throws Exception {
127+
return sendReq(path, "PUT", c, body);
128+
}
129+
105130
/**
106131
* Carries out a request.
107132
*

0 commit comments

Comments
 (0)