Skip to content

Commit 7b3f409

Browse files
v0.0.4 - Set output to true for post data
1 parent 1a09c84 commit 7b3f409

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.github.lightlibs</groupId>
88
<artifactId>SimpleHttpWrapper</artifactId>
9-
<version>0.0.3</version>
9+
<version>0.0.4</version>
1010

1111
<build>
1212
<plugins>

src/main/java/com/github/lightlibs/simplehttpwrapper/SimpleHttpWrapper.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ private static SimpleHttpResponse httpRequest(@NotNull String method, String url
4848
}
4949

5050
if (method.equals("POST") && postData != null) {
51+
connection.setDoOutput(true);
5152
try (OutputStream os = connection.getOutputStream()) {
5253
byte[] postDataBytes = postData.getBytes(StandardCharsets.UTF_8);
5354
os.write(postDataBytes, 0, postDataBytes.length);

0 commit comments

Comments
 (0)