Closed rcdilorenzo closed 10 years ago
Hey there,
Maybe I'm missing something simple, but how do I set the status code for a json response from a controller?
I can't seem to even get {:nothing, ["Cache-Control", "no-cache"], http_status :: integer} to work. Here's my code below:
{:nothing, ["Cache-Control", "no-cache"], http_status :: integer}
def check_login([], conn) do # ... conn = conn.status(401) IO.puts conn.status {:json, 401, [], []} end
...which results in either a 500 error or a 200.
Json returns 200 everytime now, it's easy to add if need HTTP status to json response
So, is the return value of this action passed to Handler.WeberReqHandler.Default.request?
Handler.WeberReqHandler.Default.request
Hey there,
Maybe I'm missing something simple, but how do I set the status code for a json response from a controller?
I can't seem to even get
{:nothing, ["Cache-Control", "no-cache"], http_status :: integer}
to work. Here's my code below:...which results in either a 500 error or a 200.