This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-17
Channels
- # alda (5)
- # bangalore-clj (1)
- # beginners (9)
- # bigdata (1)
- # boot (51)
- # carry (1)
- # cider (9)
- # cljs-dev (22)
- # clojars (39)
- # clojure (118)
- # clojure-brasil (1)
- # clojure-czech (8)
- # clojure-france (2)
- # clojure-italy (5)
- # clojure-korea (9)
- # clojure-russia (9)
- # clojure-spec (17)
- # clojure-uk (42)
- # clojurescript (48)
- # core-async (1)
- # emacs (3)
- # figwheel (1)
- # funcool (3)
- # hoplon (39)
- # klipse (51)
- # lein-figwheel (4)
- # leiningen (2)
- # luminus (5)
- # off-topic (245)
- # om (18)
- # onyx (19)
- # parinfer (1)
- # pedestal (18)
- # re-frame (47)
- # reagent (19)
- # ring-swagger (1)
- # specter (18)
- # untangled (93)
- # vim (8)
- # yada (56)
Hi, I`m trying to send a request with a :delete params and :body. however, don`t acess body in interception and handler before it changes to table-routes.
example:
(response-for test-utils/service :delete “/entity" :body “….”)
Hi @eric.vieira, I might be able to help. This is in testing?
th request :post is ok … but request :delete no access body-params
(def routes
(table/table-routes
{}
[
["/“ :post (public-interceptors home-page) :route-name :main]
["/" :delete (auth-interceptors delete-entidade) :route-name :main-delete]
]
)
)
list of intercpetors
(defn auth-interceptors [handler] [ error-handler/interceptor-error-handler (body-params/body-params) {:name :json-body :enter nil :leave parser/json->body} {:name ::auth :enter auth/token->auth :leave auth/auth->token} {:name :json-edn :enter parser/json->edn :leave parser/edn->json} handler] )
the problem is not acess body in request :delete .. in :post it is OK
And you are not doing anything to set the Content-Type header on the test requests, right?
no set
I'm going to make a quick test app and see what's going on. I'll be back in a few minutes.
find error.. miss set :headers {"Content-Type" "application/json"}
thanks