3
votes

For the 2nd iteration of our API we are performing a complete re-write.

To make the transition smooth I would like to setup our new server with an API endpoint /api/v1/** such that it will become a mirror of the old server.

Is there any built in functionality in ring/compojure that will allow me to pass the entire request to clj-http (or other http client)?


FIY: Both servers are written in Clojure using the Compojure and ring libraries.

1
how about a proxy (nginx) infront which can do the routing based on the api version? just a thought. - gagan singh
I would rather avoid installing additional software on my server and use the features provided by the api. Though it is still an option that I'll consider. - Eyal
@gagansingh Your suggestion helped me search for proxy implementation in clojure/ring which led me to my solution. - Eyal

1 Answers

4
votes

Take a look on ring-proxy, I used it exactly for the same purpose.