def create req = ActiveSupport::JSON.decode(request.body) if user = User.authenticate(req["email"], req["password"]) session[:user_id] = user.id render :json => "{\"r\": \"t\"}" + req else render :json => "{\"r\": \"f\"}" end end 'create' method is in a controller and mapped to "/login", I am setting correct content types and accept headers from my curl client. I am getting a 422 http status response all the time.
Any suggestions?