- # Write data as JSON and set the right content type header.
- fun json(json: nullable Jsonable, status: nullable Int) do
- header["Content-Type"] = media_types["json"].as(not null)
- if json == null then
+ # Write data as CSV and set the right content type header.
+ fun csv(csv: nullable CsvDocument, status: nullable Int) do
+ header["Content-Type"] = media_types["csv"].as(not null)
+ if csv == null then