We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 689d567 commit ce58244Copy full SHA for ce58244
2 files changed
bin/test-fetch-csvs.sh
@@ -1,3 +1,3 @@
1
#!/bin/sh
2
3
-curl http://localhost:8000/server/?all
+curl "http://localhost:8000/server/?events-csv"
server/index.mal
@@ -96,8 +96,10 @@
96
(cond
97
; a get request always returns a list of available CSVs
98
(= (get vars "REQUEST_METHOD") "GET")
99
- (if (not (nil? (get ($ "_GET") "all")))
100
- (response "text/csv" (concatenate-all-csvs event-names))
+ (if (not (nil? (get ($ "_GET") "events-csv")))
+ (do
101
+ (! header "Content-disposition: attachment; filename=events.csv")
102
+ (response "text/csv" (concatenate-all-csvs event-names)))
103
(response "application/json" (! json_encode event-names)))
104
105
; a PUT request writes a new line to the end of a CSV
0 commit comments