implemented sending media type on token request (and others)
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user