diff --git a/framework/src/main/java/nz/geek/goodwin/melinoe/framework/internal/rest/HttpRequestImpl.java b/framework/src/main/java/nz/geek/goodwin/melinoe/framework/internal/rest/HttpRequestImpl.java index ad77048..5003bf6 100644 --- a/framework/src/main/java/nz/geek/goodwin/melinoe/framework/internal/rest/HttpRequestImpl.java +++ b/framework/src/main/java/nz/geek/goodwin/melinoe/framework/internal/rest/HttpRequestImpl.java @@ -122,11 +122,11 @@ private HttpResult gettHttpResult(Function tSupplier, List { try { HttpResponse resp = client.send(req, HttpResponse.BodyHandlers.ofString(StandardCharsets.UTF_8)); - T t = tSupplier.apply(resp.body()); - HttpResultImpl result = new HttpResultImpl<>(req, resp, t, logger); log(requestSublogger, req, resp); - return result; + T t = tSupplier.apply(resp.body()); + + return new HttpResultImpl<>(req, resp, t, logger); } catch (Exception e) { throw new MelinoeException(e); }