From fc54b843e4c5736bf416b900db79ea1440cbee96 Mon Sep 17 00:00:00 2001 From: ulrich Date: Thu, 03 Jun 2021 12:58:20 +0000 Subject: [PATCH] Encoder Tests --- src/de/uhilger/httpserver/auth/handler/ApiLoginHandler.java | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/de/uhilger/httpserver/auth/handler/ApiLoginHandler.java b/src/de/uhilger/httpserver/auth/handler/ApiLoginHandler.java index 0fe0294..ebfbb71 100644 --- a/src/de/uhilger/httpserver/auth/handler/ApiLoginHandler.java +++ b/src/de/uhilger/httpserver/auth/handler/ApiLoginHandler.java @@ -22,6 +22,7 @@ import com.sun.net.httpserver.HttpExchange; import de.uhilger.httpserver.auth.ApiAuthenticator; import de.uhilger.httpserver.auth.realm.User; +import de.uhilger.httpserver.base.handler.HttpHelper; import de.uhilger.httpserver.base.handler.HttpResponder; import java.io.IOException; import java.util.logging.Logger; @@ -59,7 +60,7 @@ {"name": "fred", "password": "secret"} das kann wie folgt gelesen werden */ - String body = bodyLesen(exchange); + String body = new HttpHelper().bodyLesen(exchange); Gson gson = new Gson(); User user = gson.fromJson(body, User.class); return user; -- Gitblit v1.9.3