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.64k stars 1.56k forks source link

Add methods to set long and date headers #964

Closed ketan closed 3 years ago

ketan commented 6 years ago

Useful for setting headers like Expires and Last-Modified that are expected to contain timestamps.

ketan commented 6 years ago

This adds a bit more than a simple java.util.Date, but I'm hoping it'll be useful for end-users to avoid boilerplate. If you'd like for me to remove the date headers for java.sql.Date and Instant, just let me know.

perwendel commented 3 years ago

Reviewed and tested! Thanks for contributing!