mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-22 16:41:46 +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) {
|
||||
HttpRequest.BodyPublisher publisher;
|
||||
if (request != null) {
|
||||
publisher = HttpRequest.BodyPublishers.ofString(request.toString());
|
||||
publisher = HttpRequest.BodyPublishers.ofString(Launcher.gsonManager.gson.toJson(request));
|
||||
} else {
|
||||
publisher = HttpRequest.BodyPublishers.noBody();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue