Fix downloading Parchment
All checks were successful
Publish to snapshot maven / build (push) Successful in 22s
All checks were successful
Publish to snapshot maven / build (push) Successful in 22s
This commit is contained in:
parent
bc47d9cc1a
commit
5ce38092c6
|
@ -8,7 +8,7 @@ plugins {
|
|||
}
|
||||
|
||||
group = "dev.frogmc"
|
||||
version = "0.0.1-alpha.15"
|
||||
version = "0.0.1-alpha.16"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
|
|
@ -5,6 +5,7 @@ import java.net.URI;
|
|||
import java.net.http.HttpClient;
|
||||
import java.net.http.HttpRequest;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.net.http.HttpClient.Redirect;
|
||||
import java.nio.file.Path;
|
||||
|
||||
import com.electronwill.nightconfig.core.UnmodifiableConfig;
|
||||
|
@ -28,7 +29,7 @@ public class HttpHelper {
|
|||
}
|
||||
|
||||
private static <T> HttpResponse<T> request(String url, HttpResponse.BodyHandler<T> handler) throws IOException {
|
||||
try (HttpClient client = HttpClient.newHttpClient()) {
|
||||
try (HttpClient client = HttpClient.newBuilder().followRedirects(Redirect.NORMAL).build()) {
|
||||
HttpRequest request = HttpRequest.newBuilder()
|
||||
.header("User-Agent", Constants.USER_AGENT)
|
||||
.header("Accept", "*/*")
|
||||
|
|
Loading…
Reference in a new issue