This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-09-18
Channels
- # aleph (45)
- # aws (4)
- # beginners (56)
- # boot (2)
- # cider (45)
- # clara (2)
- # cljs-dev (9)
- # cljsrn (31)
- # clojure (71)
- # clojure-dusseldorf (8)
- # clojure-gamedev (1)
- # clojure-italy (22)
- # clojure-nl (1)
- # clojure-russia (46)
- # clojure-sg (1)
- # clojure-spec (5)
- # clojure-uk (40)
- # clojurescript (30)
- # community-development (3)
- # cursive (17)
- # data-science (1)
- # datomic (18)
- # emacs (3)
- # figwheel (1)
- # fulcro (19)
- # hoplon (12)
- # jobs (5)
- # leiningen (42)
- # off-topic (12)
- # om (2)
- # onyx (41)
- # re-frame (19)
- # ring-swagger (1)
- # rum (3)
- # shadow-cljs (4)
- # specter (7)
- # unrepl (2)
- # vim (25)
- # yada (24)
When I have resource like {:methods {:post {:response (fn [ctx] nil)}}}
should it result in a 404?
Yes. Nil means 404
I don’t get why I get 200 here: https://gist.github.com/borkdude/7ce01912bd8af1dfbc868f7ba82da46b
Because your response fn is returning nil
For example. Your route may match but a parameter in the path (e.g. accno) points to a resource (e.g. bank account) that doesn't exist
Sorry I misread the problem
The semantics for post are different.
You may be adding a message to a queue, inserting a database record, anything. The default response status should be 200 OK (I believe)
I see 'gzip' mentioned a few places when searching the repo. (like here https://github.com/juxt/yada/blob/e76c7b2de91dbac33c0e6e394ad2269b6cbee5fe/talks/fby-2016.org#but-you-can-do)
Is there a way to enable it?
@frozenlock I think that's just for accepting Gzip'd requests
@danielcompton Thanks, I'll give it a try!
@danielcompton It worked! Thanks 🙂
No problem. I have a feeling that it will compress everything, including images if you're serving them from that server
Is this a problem for caching?
not really, but it's unnecessary as images are already pretty compressed
Ah, right.
if you're caching your static assets with a CDN in front then it probably doesn't matter