3

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.

Eyal
  • 758
  • 6
  • 23
  • 2
    how about a proxy (nginx) infront which can do the routing based on the api version? just a thought. – gagan singh Jun 27 '18 at 07:18
  • 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 Jun 27 '18 at 07:30
  • @gagansingh Your suggestion helped me search for proxy implementation in clojure/ring which led me to my solution. – Eyal Jun 27 '18 at 07:50

1 Answers1

4

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

Vlad Bokov
  • 361
  • 2
  • 9