mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 11:39:11 +03:00
[FIX] jsonRequest
This commit is contained in:
parent
0ab9327c74
commit
19344b9d27
1 changed files with 1 additions and 1 deletions
|
@ -44,7 +44,7 @@ public class JsonCoreProvider extends AuthCoreProvider {
|
||||||
public static <T, R> R jsonRequest(T request, String url, String bearerToken, Class<R> clazz, HttpClient client) {
|
public static <T, R> R jsonRequest(T request, String url, String bearerToken, Class<R> clazz, HttpClient client) {
|
||||||
HttpRequest.BodyPublisher publisher;
|
HttpRequest.BodyPublisher publisher;
|
||||||
if (request != null) {
|
if (request != null) {
|
||||||
publisher = HttpRequest.BodyPublishers.ofString(request.toString());
|
publisher = HttpRequest.BodyPublishers.ofString(Launcher.gsonManager.gson.toJson(request));
|
||||||
} else {
|
} else {
|
||||||
publisher = HttpRequest.BodyPublishers.noBody();
|
publisher = HttpRequest.BodyPublishers.noBody();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue