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

Response type unchanged. #1144

Closed mluis closed 4 years ago

mluis commented 4 years ago

While explicitly setting the following mime type it gets ignored and returns 'application/json'. Althought the 'Content-disposition' gets changed accordingly.

What could be wrong?

get('/foo',(req, resp) -> {
    resp.type("application/vnd.ms-excel");
    resp.header("Content-disposition", "attachment; filename=report.xls");
});
mluis commented 4 years ago

Check for the after. The answer will be there.