mirror of
https://github.com/raws/minecraft-forge-mattercraft.git
synced 2025-08-03 17:57:42 -04:00
Write correct request body byte length (#2)
Fixes #1, an HTTP 400 Bad Request error caused by a byte length mismatch.
This commit is contained in:
parent
889220837c
commit
fae5d5f705
@ -45,7 +45,7 @@ public class MatterbridgeApiClient {
|
|||||||
|
|
||||||
try (OutputStream outputStream = connection.getOutputStream()) {
|
try (OutputStream outputStream = connection.getOutputStream()) {
|
||||||
byte[] requestBodyBytes = requestBody.getBytes(StandardCharsets.UTF_8);
|
byte[] requestBodyBytes = requestBody.getBytes(StandardCharsets.UTF_8);
|
||||||
outputStream.write(requestBodyBytes, 0, requestBody.length());
|
outputStream.write(requestBodyBytes, 0, requestBodyBytes.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (connection.getResponseCode() >= 400) {
|
if (connection.getResponseCode() >= 400) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user