Trying to POST without using form in Rails, I got this error:
Can't verify CSRF token authenticity
Completed 422 Unprocessable Entity in 1ms
ActionController::InvalidAuthenticityToken
To (temporarily?) solve this, add this line in the Controller:
protect_from_forgery with: :null_session