reitit

Samuel Ludwig 2024-04-10T17:01:31.542339Z

when testing a reitit.ring/ring-handler via function call (app {:request-method :get, :uri ..., :query-params ...}); what is the key I can pass into the request map to pass through specific headers? I've tried :headers and :header-params but to no avail- or are headers not something I can specify via this method?

Samuel Ludwig 2024-04-10T17:24:18.885629Z

to specify further on what I'm hoping to observe: I'm trying to pass through an "Accept" header for "application/edn" to confirm that things more or less look how I expect, but my test-calls are all being returned in JSON

Ben Sless 2024-04-10T18:17:29.318699Z

Should be headers https://github.com/ring-clojure/ring/blob/master/SPEC.md#14-request-maps

Ben Sless 2024-04-10T18:19:30.376069Z

You can also add the print request diff middleware transformer to see exactly what gets passed and when those decisions are made

🙌 1