Sometimes we need to set only status code (as example for HTTP 204) without returning an empty string.
it's surprise for beginners and me too:) that this code doesn't work as expected
Spark.head("/api/resource/check", (req, res) -> { res.status(HttpStatus.NO_CONTENT_204); return null; });
Sometimes we need to set only status code (as example for HTTP 204) without returning an empty string. it's surprise for beginners and me too:) that this code doesn't work as expected
Spark.head("/api/resource/check", (req, res) -> { res.status(HttpStatus.NO_CONTENT_204); return null; });