This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-12-06
Channels
- # adventofcode (112)
- # announcements (6)
- # beginners (197)
- # boot (3)
- # calva (52)
- # cider (25)
- # clara (14)
- # cljdoc (6)
- # clojure (147)
- # clojure-austin (6)
- # clojure-berlin (7)
- # clojure-brasil (2)
- # clojure-europe (3)
- # clojure-india (4)
- # clojure-italy (8)
- # clojure-new-zealand (2)
- # clojure-nl (7)
- # clojure-russia (7)
- # clojure-spec (29)
- # clojure-uk (63)
- # clojurescript (103)
- # core-async (5)
- # cursive (11)
- # datomic (16)
- # devcards (1)
- # emacs (28)
- # figwheel-main (3)
- # fulcro (97)
- # graphql (4)
- # hyperfiddle (1)
- # jobs (1)
- # kaocha (3)
- # lumo (9)
- # nrepl (4)
- # off-topic (29)
- # onyx (1)
- # pathom (4)
- # pedestal (8)
- # re-frame (24)
- # reagent (1)
- # reitit (13)
- # ring-swagger (7)
- # rum (11)
- # shadow-cljs (79)
- # sql (46)
- # tools-deps (67)
- # yada (8)
when I have these options:
:media-type #{"text/plain"
#_"application/octet-stream"}
I get the response as a viewable text file in the browser. But when I add "application/octet-stream"
, it won’t show in the browser but becomes a download, although the request/response headers seem identical. Any idea?Download:
Connection: Keep-Alive
Content-Length: 2053470
Content-Type: text/plain
Date: Thu, 06 Dec 2018 13:17:18 GMT
Server: Aleph/0.4.4
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Viewable as plain text:
Connection: Keep-Alive
Content-Length: 2053470
Content-Type: text/plain
Date: Thu, 06 Dec 2018 13:19:14 GMT
Server: Aleph/0.4.4
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
That's odd. Try adding a q value
Could you raise an issue? Worth capturing this.
Are you somehow manually setting Content-Type in the response in your code?
{:swagger/tags ["articles"]
:produces
{:media-type #{"text/plain; q=1"
"application/octet-stream; q=0.9"}}
:methods
{:get
{:swagger/summary "Export search results to nbib format"
:parameters {:query {(s/optional-key :limit) s/Int
:blunt String
(s/optional-key :format) String}}
:response
(fn [ctx]
... <- string)}}}