ring

teodorlu 2021-07-02T14:08:20.031Z

Hi! When I POST to my endpoint, ring.adapter.jetty gives me a :body of type org.eclipse.jetty.server.HttpInputOverHTTP. How can I create an instance of HttpInputOverHTTP from a string? That would help me work from the REPL.

✔️ 1
teodorlu 2021-07-02T14:09:49.031100Z

Hmm, perhaps I can just create an input stream. The spec says that the body should be a java.io.InputStream.

:body
  (Optional, java.io.InputStream)
  An InputStream for the request body, if present.

teodorlu 2021-07-02T14:11:44.031300Z

Looks like (io/input-stream (.getBytes "{\"my\":\"json\"")) might just be it. Don't mind me! :duckie: