Fork me on GitHub
#ring
<
2016-06-29
>
roberto15:06:17

what is the conventional way to keywordize requests?

roberto15:06:03

I normally have my own function that takes the params in a request and keywordize all the keys, but was wondering if there is some other way of doing this

zane16:06:23

Doing that via middleware sounds idiomatic to me.

zane16:06:44

You could either write your own or use one from a library, e.g. https://github.com/ngrunwald/ring-middleware-format

zane16:06:22

See :json-kw in that README.

roberto16:06:29

aw, I was using that, but didn’t see json-kw. I thought just :json would do it. Thanks

roberto16:06:53

I think json-kw should be the default tho, I don’t recall ever having to to use the json payload as a string alone.

zane17:06:46

I agree!