Skip to content

Commit e8889d9

Browse files
Fix join requests
1 parent b452c31 commit e8889d9

File tree

1 file changed

+5
-2
lines changed
  • protocol/src/main/java/org/geysermc/mcprotocollib/auth/util

1 file changed

+5
-2
lines changed

protocol/src/main/java/org/geysermc/mcprotocollib/auth/util/HTTPUtils.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,11 @@ public static <T> T makeRequest(@Nullable ProxyInfo proxy, URI uri, Object input
3636
throw new IllegalArgumentException("URI cannot be null.");
3737
}
3838

39-
HttpResponse response = createHttpClient(proxy).execute(input == null ? new HttpRequest("GET", uri.toURL()) :
40-
new HttpContentRequest("POST", uri.toURL()).setContent(HttpContent.string(GSON.toJson(input))));
39+
HttpResponse response = createHttpClient(proxy)
40+
.execute(input == null ? new HttpRequest("GET", uri.toURL()) :
41+
new HttpContentRequest("POST", uri.toURL())
42+
.setContent(HttpContent.string(GSON.toJson(input)))
43+
.setHeader(Headers.CONTENT_TYPE, ContentTypes.APPLICATION_JSON.toString()));
4144

4245
if (responseType == null) {
4346
return null;

0 commit comments

Comments
 (0)