Skip to content

Commit

Permalink
Fix join requests
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexProgrammerDE committed Jul 18, 2024
1 parent b452c31 commit e8889d9
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@ public static <T> T makeRequest(@Nullable ProxyInfo proxy, URI uri, Object input
throw new IllegalArgumentException("URI cannot be null.");
}

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

if (responseType == null) {
return null;
Expand Down

0 comments on commit e8889d9

Please sign in to comment.