clj-commons / aleph

Asynchronous streaming communication for Clojure - web server, web client, and raw TCP/UDP
http://aleph.io
MIT License
2.54k stars 241 forks source link

client: add wrap-validation for ring request #665

Closed arnaudgeiser closed 1 year ago

arnaudgeiser commented 1 year ago

This adds a wrap-validation middleware which guarantees the presence of the request-method key.

Closes #162

arnaudgeiser commented 1 year ago

Do you think I can move forward with this @KingMob?

KingMob commented 1 year ago

Sorry, I keep wondering if Malli wouldn't be better, so I've held off on further comment. But I haven't had time to investigate. Been working on HTTP/2 stuff. And actual work.

I just know if we start using spec, we'll probably continue with it, even if it's not the best tool for the job. I know Malli is under more active development, is more data-oriented, and the Metosin libs have a reputation for performance, which is one of Aleph's strengths.

Ehh, let me take a quick stab at it first.