I am trying to server html over a ring based api server path . however everytime i hit the endpoint , i am getting this wierd error
java.lang.IllegalArgumentException: No implementation of method: :write-body-to-stream of protocol: #'ring.core.protocols/StreamableResponseBody found for class: clojure.lang.PersistentArrayMap
at clojure.core$_cache_protocol_fn.invokeStatic(core_deftype.clj:583) ~[clojure-1.10.1.jar:?]
at clojure.core$_cache_protocol_fn.invoke(core_deftype.clj:575) ~[clojure-1.10.1.jar:?]
at ring.core.protocols$eval18503$fn__18504$G__18494__18513.invoke(protocols.clj:8) ~[?:?]
at ring.util.servlet$update_servlet_response.invokeStatic(servlet.clj:106) ~[?:?]
at ring.util.servlet$update_servlet_response.invoke(servlet.clj:91) ~[?:?]
at ring.util.servlet$update_servlet_response.invokeStatic(servlet.clj:95) ~[?:?]
at ring.util.servlet$update_servlet_response.invoke(servlet.clj:91) ~[?:?]
at ring.adapter.jetty$proxy_handler$fn__18623.invoke(jetty.clj:27) ~[?:?]
Here is what my api is returning.
{:status 200
:body (resource-response "index.html" {:root "public"})}
Whereas if i hit the index.html path directly it is accessible at this route
http://localhost:8080/index.html