diff --git a/src/main/java/httpServer/httpServer/src/handlers/RequestHandler.java b/src/main/java/httpServer/httpServer/src/handlers/RequestHandler.java index bc002e0..e67b2d1 100644 --- a/src/main/java/httpServer/httpServer/src/handlers/RequestHandler.java +++ b/src/main/java/httpServer/httpServer/src/handlers/RequestHandler.java @@ -3,6 +3,7 @@ package httpServer.httpServer.src.handlers; import com.fasterxml.jackson.databind.ObjectMapper; import com.sun.net.httpserver.HttpExchange; import common.common.src.html.HtmlManager; +import common.common.src.json.JsonManager; import common.common.src.logger.Logger; import httpServer.httpServer.src.annotations.AllowedVerb; import httpServer.httpServer.src.annotations.OnlyAuthorizedClients; @@ -44,8 +45,7 @@ public class RequestHandler implements IRequestHandler { .lines() .reduce("", (acc, line) -> acc + line + "\n"); - ObjectMapper mapper = new ObjectMapper(); - Client client = mapper.readValue(body, Client.class); + Client client = JsonManager.deserialize(body, Client.class); System.out.println("Received POST data:\n" + body);