perwendel / spark

A simple expressive web framework for java. Spark has a kotlin DSL https://github.com/perwendel/spark-kotlin
Apache License 2.0
9.63k stars 1.56k forks source link

Is it possible to have an empty response body? #1163

Closed isaac-weisberg closed 4 years ago

isaac-weisberg commented 4 years ago

I am using Kotlin and me returning kotlin.Unit from the route handler literally serializes it into a string that says "kotlin.Unit". How am I supposed to return literally nothing? I have tried returning null - but the framework has decided this means that the route is unhandled. And it made it a 404 and handled accordingly. What the fuck?

Is it the empty string that I'm supposed to return?

isaac-weisberg commented 4 years ago

Yes, yes it actually is.