implemented sending media type on token request (and others)

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2024-10-20 21:59:18 +02:00
parent 2fbb9803fb
commit 7da96e98b0
2 changed files with 1 additions and 1 deletions

View File

@@ -178,6 +178,7 @@ public abstract class PathHandler implements HttpHandler {
if (o instanceof List<?> list) o = new JSONArray(list);
if (o instanceof Map<?, ?> map) o = new JSONObject(map);
if (o instanceof Error<?> error) o = error.json();
if (o instanceof JSONObject) ex.getResponseHeaders().add(CONTENT_TYPE, JSON);
return sendContent(ex, status, o.toString().getBytes(UTF_8));
}

View File

@@ -21,7 +21,6 @@ import jakarta.mail.*;
import jakarta.mail.internet.*;
import java.io.IOException;
import java.time.Duration;
import java.util.Comparator;
import java.util.Map;
import java.util.Optional;
import java.util.Set;