Fork me on GitHub
Ramon Rios13:01:16

Folks, did you guys use martian? It's not clear to me on the docs how i would code a request that contains path parameters (e.g) /my-path/:my-param-value

(re-frame/dispatch [::martian/request             ;; event for performing an http request
                    :create-pet               ;; the route name to call
                    {:name "Doggy McDogFace"  ;; data to send to the endpoint
                     :type "Dog"
                     :age 3}
                    ::create-pet-success      ;; event to dispatch on success
                    ::http-failure            ;; event to dispatch on failure
This is the example that i saw in the documentation, is clear to me on pass body data but not path-params


After a brief look at the martian source code, it seems that it will take the named parameter right from that data map.

Ramon Rios13:01:01

So it get the path data by it's name? interesting