Minor fix
This commit is contained in:
@@ -3,6 +3,7 @@ package httpServer.httpServer.src.handlers;
|
|||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.sun.net.httpserver.HttpExchange;
|
import com.sun.net.httpserver.HttpExchange;
|
||||||
import common.common.src.html.HtmlManager;
|
import common.common.src.html.HtmlManager;
|
||||||
|
import common.common.src.json.JsonManager;
|
||||||
import common.common.src.logger.Logger;
|
import common.common.src.logger.Logger;
|
||||||
import httpServer.httpServer.src.annotations.AllowedVerb;
|
import httpServer.httpServer.src.annotations.AllowedVerb;
|
||||||
import httpServer.httpServer.src.annotations.OnlyAuthorizedClients;
|
import httpServer.httpServer.src.annotations.OnlyAuthorizedClients;
|
||||||
@@ -44,8 +45,7 @@ public class RequestHandler implements IRequestHandler {
|
|||||||
.lines()
|
.lines()
|
||||||
.reduce("", (acc, line) -> acc + line + "\n");
|
.reduce("", (acc, line) -> acc + line + "\n");
|
||||||
|
|
||||||
ObjectMapper mapper = new ObjectMapper();
|
Client client = JsonManager.deserialize(body, Client.class);
|
||||||
Client client = mapper.readValue(body, Client.class);
|
|
||||||
|
|
||||||
System.out.println("Received POST data:\n" + body);
|
System.out.println("Received POST data:\n" + body);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user