This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-02-08
Channels
- # aatree (3)
- # announcements (1)
- # architecture (5)
- # beginners (27)
- # boot (22)
- # cider (17)
- # cljsrn (8)
- # clojure (93)
- # clojure-canada (1)
- # clojure-dev (7)
- # clojure-nl (10)
- # clojure-poland (216)
- # clojure-russia (35)
- # clojurescript (163)
- # community-development (6)
- # cursive (25)
- # datavis (6)
- # datomic (18)
- # dirac (10)
- # dysphemism (4)
- # editors (3)
- # editors-rus (1)
- # emacs (15)
- # hoplon (124)
- # instaparse (25)
- # jobs (10)
- # ldnclj (78)
- # lein-figwheel (11)
- # leiningen (6)
- # off-topic (20)
- # om (149)
- # onyx (2)
- # parinfer (5)
- # portland-or (1)
- # proton (62)
- # quil (2)
- # re-frame (8)
- # spacemacs (4)
- # yada (20)
@malcolmsparks: I just noticed that the PUT method seems to be overwriting my http status codes, is this by design?
(request [_ ctx]
(let [f (get-in ctx [:resource :methods (:method ctx) :response]
(fn [_] (d/error-deferred
(ex-info (format "Resource %s does not provide a handler for :put" (type (:resource ctx)))
{:status 500}))))]
(d/chain
(f ctx)
(fn [res]
(assoc-in ctx [:response :status]
(cond
;; TODO: A 202 may be not what the user wants!
;; TODO: See RFC7240
(d/deferred? res) 202
(ctx/exists? ctx) 204
:otherwise 201))))))
Ah, you're right - I haven't got something similar to POST (interpret-post-result) therefore you can't return responses. Let me fix that. You're returning a modified (:response ctx) in your handler?
yes, for example when my domain finds that a request in unauthorized I explicitly set 401 in the response
OK, are you able to take an updated yada release?
ok, give me a few mins
[yada "1.1.0-20160207.113859-19"]
Travis CI passing
In other news, I'm now in documentation mode much more now and have broken the user-manual into chapters. I'm publishing the user-manual as a e-book https://leanpub.com/yada but the markdown sources will always be available in the yada repo
The old single-file format was become unwieldy
yeah, sorry, I pasted the -20 line into the README, killed the -19 line, and that was in my yank buffer when I pasted to slack - schoolboy error!
I need to go on a copy-and-paste training course
oh sorry @dominicm is that another slack faux-pas from me? I must learn to react properly