pedestal

vc 2024-09-27T11:57:50.745709Z

Hi, I have two routes /echo :get /:endpoint :post second is working fine but first is giving 404 what could i be missing?

mavbozo 2024-09-27T13:25:03.110309Z

Pedestal defaults to using prefix tree router but there's a caveat. Provides less control over routing. For example, Wild card routes always win. The path /foo/:bar will always match over /foo/baz. http://pedestal.io/pedestal/0.7/reference/prefix-tree-router.html#_caveats

vc 2024-09-27T13:29:22.029599Z

got it thanks for your answer

vc 2024-09-27T13:36:33.429879Z

but the /echo is at :get while wildcard is at :post

hlship 2024-09-27T14:57:53.138349Z

That should work with prefix-tree (but I’d have to check), I know it will work with the new sawtooth router.

vc 2024-09-27T14:58:46.734219Z

sry i haven't followed with the latest updated, i was 0.5.6 and tried the updates

mavbozo 2024-09-28T12:55:13.494469Z

@hlship I tried using 0.7.0. POST works, GET does not.

👍 1
hlship 2024-09-27T23:13:47.841399Z

io.pedestal/pedestal 0.7.1 Pedestal is a set of Clojure libraries that bring the core Clojure principles - Simplicity, Power, and Focus - to server-side development. https://github.com/pedestal/pedestal Changes: • Correctly report the tracing span status • Change the embedded template to include an example using a POST and body parameters https://github.com/pedestal/pedestal/milestone/19?closed=1

❤️ 1