mirror of
https://github.com/kiranhart/Auction-House.git
synced 2024-11-22 05:25:11 +01:00
8️⃣ enforce utf-8 within stream write
Took 2 minutes
This commit is contained in:
parent
c91ace0804
commit
1dfd00dbcb
@ -24,6 +24,7 @@ import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.lang.reflect.Array;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
@ -158,7 +159,7 @@ public class DiscordWebhook {
|
||||
connection.setRequestMethod("POST");
|
||||
|
||||
OutputStream stream = connection.getOutputStream();
|
||||
stream.write(json.toString().getBytes());
|
||||
stream.write(json.toString().getBytes(StandardCharsets.UTF_8));
|
||||
stream.flush();
|
||||
stream.close();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user