This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-06-21
Channels
- # admin-announcements (2)
- # aws-lambda (2)
- # beginners (26)
- # boot (179)
- # cider (36)
- # cljs-dev (118)
- # cljsrn (23)
- # clojure (150)
- # clojure-android (1)
- # clojure-austin (7)
- # clojure-austria (3)
- # clojure-canada (1)
- # clojure-dev (7)
- # clojure-dusseldorf (4)
- # clojure-germany (3)
- # clojure-greece (34)
- # clojure-nl (4)
- # clojure-quebec (9)
- # clojure-russia (30)
- # clojure-spec (38)
- # clojure-uk (3)
- # clojurescript (46)
- # clr (1)
- # core-async (2)
- # css (2)
- # cursive (17)
- # datomic (12)
- # devcards (8)
- # dirac (1)
- # docker (2)
- # hoplon (216)
- # jobs (2)
- # kekkonen (1)
- # lein-figwheel (18)
- # leiningen (2)
- # luminus (1)
- # mount (4)
- # off-topic (2)
- # om (15)
- # onyx (1)
- # parinfer (1)
- # pedestal (2)
- # planck (26)
- # reagent (98)
- # spacemacs (6)
- # specter (19)
- # spirituality-ethics (54)
- # untangled (22)
- # vim (24)
- # yada (4)
Getting an unexpected error, trying to follow Mutation section of the instructions here https://juxt.pro/yada/manual/hello.html My code looks like this (require '[aleph.http :refer [start-server]] '[bidi.ring :refer [make-handler] :as bidi] '[yada.yada :refer [yada] :as yada]) (def hello-atom (yada (atom "Hello World!"))) (def api ["/hello-atom" hello-atom]) (def server (start-server (bidi/make-handler api) {:port 3000})) GET requests work as expected, but PUT gives 400 error $ curl -i http://localhost:3000/hello-atom -X PUT -d "Hello Dolly!" HTTP/1.1 400 Bad Request Content-Length: 260 Content-Type: application/json Server: Aleph/0.4.1 Connection: Keep-Alive Date: Tue, 21 Jun 2016 09:25:29 GMT {"status":400,"message":"Bad Request","id":"5a67ab22-c83a-40ac-aa52-a3e55610ca74","error":{"error":"clojure.lang.ExceptionInfo: Bad form fields {:status 400, :error (not (map? \"Hello Dolly!\"))}","data":"{:status 400, :error (not (map? \"Hello Dolly!\"))}"}}
@mikeyr: try curl -i http://localhost:3000/hello-atom -X PUT -F 'value=Hello Dolly!'
thanks for the report. I'm migrating this chapter over to http://juxt.pro currently and going through the examples, I'm not quite there yet
@malcolmsparks: that worked. 10,000 thank yous!