Support HTTP redirects, fix #77

This commit is contained in:
yushijinhun 2020-08-12 19:33:06 +08:00
parent b4f571a88d
commit 0bd7134c81
No known key found for this signature in database
GPG key ID: 5BC167F73EA558E4

View file

@ -58,7 +58,6 @@ public final class IOUtils {
HttpURLConnection conn = createConnection(url, proxy);
conn.setRequestMethod(method);
conn.setDoOutput(true);
conn.setFixedLengthStreamingMode(payload.length);
conn.setRequestProperty("Content-Type", contentType);
try (OutputStream out = conn.getOutputStream()) {
out.write(payload);