Skip to content

Commit 277bff3

Browse files
committed
Correct POST request.
1 parent f9a4390 commit 277bff3

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

src/main/java/fr/rabian/ovhApi/http/HttpRequests.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,18 @@
1616

1717
public abstract class HttpRequests {
1818

19+
/**
20+
* GET request.
21+
*
22+
* @param url URL
23+
* @param out StringBuffer to store response in
24+
* @return Response code
25+
* @throws Exception Exception Occuring during the request
26+
*/
27+
public static int sendGet(String url, StringBuffer out) throws Exception {
28+
return sendWithoutBody(url, "GET", out, null);
29+
}
30+
1931
/**
2032
* GET request.
2133
*
@@ -103,7 +115,7 @@ public static int sendPut(String url, StringBuffer out, String body, List<Header
103115
* @throws Exception Occuring during the request
104116
*/
105117
public static int sendPost(String url, StringBuffer out, String body, List<Header> headers) throws Exception {
106-
return sendWithBody(url, "POST", out, body, null);
118+
return sendWithBody(url, "POST", out, body, headers);
107119
}
108120

109121
/**

0 commit comments

Comments
 (0)