{"issue":{"pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"state":"closed","user":{"avatar_url":"https://secure.gravatar.com/avatar/1d4a45a695b48edc70359ca6d015e2f4?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"1d4a45a695b48edc70359ca6d015e2f4","url":"https://api.github.com/users/JohnMerlino1","login":"JohnMerlino1","id":233574},"milestone":null,"assignee":null,"labels":[],"updated_at":"2011-11-04T16:22:38Z","comments":0,"closed_at":"2011-11-04T16:22:38Z","url":"https://api.github.com/repos/plataformatec/devise/issues/1415","body":"Hey all,\r\n\r\nI been struggling on this issue for  a few days now. 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:\r\n\r\n\r\n<html><body>You are being <a href=\"http://localhost:3000/users/sign_in.json\">redirected</a>.</body></html>\r\n\r\nHowever, when I log out through the application using this:\r\n\r\nhttp://localhost:3000/users/sign_out.json\r\n\r\nI succesfully get json back:\r\n\r\n{\"success\":true,\"auth_token\":null}\r\n\r\nSo I am wondering what is causing this redirect? \r\n\r\nHere's what happens:\r\ncurl -H 'Content-Type: application/json' \\\r\n> -H 'Accept: application/json' \\\r\n> -X POST \\\r\n> -H 'X-HTTP-Method-Override: DELETE' http://localhost:3000/users/sign_out \\\r\n> -d '{\"authentication_token\": \"shama9fpeLH8PzS4AZXX\"}' \\\r\n> -c cookie\r\n<html><body>You are being <a href=\"http://localhost:3000/users/sign_in.json\">redirected</a>.</body></html>\r\n\r\nI didnt even get a response on stackoverflow or google groups: http://stackoverflow.com/questions/7997009/rails-3-calling-destroy-method-with-curl\r\n\r\nIm running dry of ideas.\r\nthanks for response","html_url":"https://github.com/plataformatec/devise/issues/1415","title":"signing out using curl shows a redirect, and doesnt return json response","number":1415,"id":2144530,"created_at":"2011-11-04T14:51:39Z"},"action":"closed"}