ldnclj

Find us on #clojure-uk
agile_geek 2016-01-08T07:29:36.000960Z

Morning London ppl. I'm thinking hard about what I'm doing after contract finishes in Feb. A number of options, but nothing that pays atm!

thomas 2016-01-08T09:08:17.000961Z

@agile_geek: talk to @mccraigmccraig 😉

davesnowdon 2016-01-08T10:28:27.000962Z

Newbie question: I need to build a RESTful API using clojure and am wondering what library to start with as I've done very little web server dev with clojure. I've seen mention of people using pedastal and compojure-api, and Malcolm Spark's yada looks interesting. Any recommendations on which to try first? I don't need to serve any pages or static content. I need to support adding security headers (CORS, HSTS) and also need to handle file uploads. OAuth2 support is also required.

thomas 2016-01-08T10:31:18.000963Z

@davesnowdon: in that case Yada might be a good lib... not sure though how good is for a newbie.

thomas 2016-01-08T10:31:36.000964Z

ask over in the yada channel what people think.

thomas 2016-01-08T10:32:18.000965Z

ooh and watch the talks that Malcolm has given on yada (The one from ClojureEx I am in as well actually)

thomas 2016-01-08T10:32:24.000966Z

hth

davesnowdon 2016-01-08T11:00:16.000967Z

thanks @thomas . I hadn't spotted there was a yada channel

mccraigmccraig 2016-01-08T11:09:59.000968Z

@davesnowdon: yada is worth a play with - though i don't know about OAuth2 support - yada uses aleph which is as ring compatible as it can be given that it's responses are promises (well, manifold Deferreds), but if your OAuth2 impl of choice is a ring handler which modifies response it probably won't work without some patching

davesnowdon 2016-01-08T11:20:19.000969Z

thanks @mccraigmccraig - I haven't settled on an OAuth2 implementation yet

mccraigmccraig 2016-01-08T11:22:13.000970Z

i'm using buddy's JWS tokens for auth with yada - https://funcool.github.io/buddy-auth/latest/#jws-token - but i have full control of the client, so i get to choose