Fork me on GitHub
#yada
<
2019-02-11
>
grierson14:02:54

How do I return a 201 response from a POST request with Yada? Currently returning 200.

dominicm14:02:35

(assoc (:response ctx) :status 201)

👍 5
grierson14:02:21

@dominicm Thanks. Will I have to set the status response code for every response other than 200 or 404? It's just that in the documentation says "yada attempts to set the correct status code and headers according to the semantics of both the method and mime-type."

malcolmsparks15:02:52

You could override the POST method semantics with your own version. It's a defmethod.