I am fixing an application that should support a duplicate character in requests sent to the server (for development). Requests are sent via JSON. Currently, if I call the following more than once:
curl -v -b cookie.file -c cookie.file -H "Content-Type: application/json" -X POST -d '{"user":{"username":"kevin","password":"password"}}' http://localhost:3000/users/sign_in.json
The first results are in status code 201 , and the second result is in 302 , which redirects to the HTML page. I overridden the create method in Users::SessionsController , however, the user code is only called on the first POST (nothing happens for the second). Any way to get a second request not to redirect? Here is what I still have:
class Users::SessionsController < Devise::SessionsController def create logger.info "Users::SessionController" super end end
source share