plataformatec/devise — Issue #1416: signing out using curl shows a redirect, and doesnt return json response
Author: JohnMerlino1
Created: 2011-11-04 14:54:12+00:00
State: open

Hey all,

I can successfully log in and get a json response through curl. However, when I try to log out in curl, I get this i return:

curl -H 'Content-Type: application/json' \
> -H 'Accept: application/json' \
> -X POST \
> -H 'X-HTTP-Method-Override: DELETE' http://localhost:3000/users/sign_out \
> -d '{"authentication_token": "shama9fpeLH8PzS4AZXX"}' \
> -c cookie

You are being redirected.

However, it works when I log out through the application using this:

http://localhost:3000/users/sign_out.json

I succesfully get json back:

{"success":true,"auth_token":null}

So I am wondering what is causing this redirect?

I didnt even get a response on stackoverflow or google groups: http://stackoverflow.com/questions/7997009/rails-3-calling-destroy-method-with-curl

Im running dry of ideas.
thanks for response