Fork me on GitHub
#ring
<
2018-09-14
>
grierson08:09:47

How do I log incoming request params so that I can debug why I am getting a nil response?

seancorfield15:09:58

That says syntax error on line 32 of app.clj... @grierson

grierson15:09:32

@seancorfield I manged to work it out, it's because compojure was destructing request looking for a :request key causing nil to be passed into the handler. However being able to log the incoming request and params would of helped.

borkdude15:09:24

I’m not sure lib-noir should still be used, but there was a question asked on SO: https://stackoverflow.com/questions/52334131/why-is-username-not-saved-in-noir-session-in-clojure-project Maybe someone can recommend a better current day approach

borkdude15:09:36

Seems to me that lib-noir is very old and abandoned

dbernal16:09:22

is it possible to maintain order for a map in a response while utilizing the compojure api "return" parameter with a defined schema? I'm running into an issue where I would like to validate the outgoing response but when I do this it re-orders it

borkdude20:09:09

@dbernal maps aren’t ordered collections

borkdude21:09:01

if you want to have a specific order, use a seq of tuples or a sorted-map

dbernal23:09:09

@borkdude I have a sorted map but the problem I'm having right now is that when I coerce a response value through compojure api it seems to re-order my map and I haven't been able to get around that. When I take off the coercion it maintains the order