Fork me on GitHub

won't that 400 if i have query parameter coercion?


if i make a format mimicking the code of the muuntaja built-ins that should work as expected right? eg


true that, if you have coercion, you need to parse the format before it. EDN-format is a good example of an simple format.


all right gonna make a plaintext format for xml/html/plaintext


i had this function for byte array input stream -> string

(defn bais->bytes
  [^ bais]
  (.reset bais)
  (let [av (.available bais)
        bs (byte-array av)]
    (.read bais bs 0 av)
    (String. bs "UTF-8")))
i'm not familiar with the properties of that object, i made it based on simple trial and error. is it safe(r) to use the inputstreamreader -> pushbackreader way i see in your edn format?


EDN requires a pushbackreader, no other reason for it.

👍 4

all right made a basic plaintext one that can be parameterized for any content type that should be handled as plain text

(defn format
  ([] (format "application/xml"))
      {:name content-type
       :matches [(re-pattern
                   (clojure.string/replace-first content-type "/" "/(.+\\+)"))]
       :decoder [decoder]
       :encoder [encoder]})))


[metosin/reitit "0.2.3"] is out with default OPTIONS endpoints generated for all paths (to better support CORS), parameter-middleware fix & updated deps. Changelog:

🎉 8