-
-
Save DGaffney/79f60f8beb3e5e9a1bbc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;Relevant line, inside a (defroutes app): | |
(ANY "/endpoint" {params :params} (respond (println (response/json params)))) | |
Package I'm sending in via Ruby (:attributes is a list of maps, and it is becoming just the *last* map instead of being a list of them for some reason): | |
RestClient.post("http://0.0.0.0:8080/v1/node/create.json", {:id => "peat", :label => "Peat Bakke", :attributes => [{:for => "attribute_name", :value => 1}, {:for => "something_else", :value => "wee"}]}) | |
Printout from clojure re the line above: | |
{:headers {Content-Type application/json; charset=utf-8}, :body {"attributes":{"value":"wee","for":"something_else"},"label":"Peat Bakke","id":"peat"}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment