0
我在与Restkit +的iOS 5 + Rails的一个奇怪的问题轨发帖时:当我尝试做这样的服务器上的一个帖子:错误404与RestKit的iOS 5
NSArray *topicsList=[self.topicsTV.text componentsSeparatedByString:@","];
RKParams *params = [NSDictionary dictionaryWithObjectsAndKeys: self.questionTV.text,@"question[text]",
self.descriptionTV.text,@"question[detail]",
topicsList,@"topics[]", nil
];
[[RKClient sharedClient] post:@"/questions.json" params:params delegate:self];
日志会是这样:
2012-01-11 17:24:21.725 APP[29087:fb03] I restkit.network:RKRequest.m:562 Status Code: 401
2012-01-11 17:24:21.725 APP[29087:fb03] I restkit.network:RKRequest.m:563 Body: {"error":"You have to register or login."}
注意张贴我在100%记录,因为我能得到获得一些私人的内容和所发生的事情是,如果我刷新私有内容(被发送到服务器),它给前我这个错误:
2012-01-11 17:35:51.337 APP[29087:fb03] D restkit.network.queue:RKRequestQueue.m:455 Request <RKObjectLoader: 0x811c360> failed loading in queue <RKRequestQueue: 0xc60ea10 name=(null) suspended=NO requestCount=0 loadingCount=0/5> with error: The operation couldn’t be completed. (org.restkit.RestKit.ErrorDomain error 1004.).(Now loading 0 of 5).
该操作是否注销了我?我应该如何维持登录会话活着?
theese是我的职位参数: 参数:{ “UTF8”=> “✓”, “authenticity_token”=> “rEwYQT9tKGtqW4Tp4wtBZTN5zl + HPOK5k/ZpGs0nAJc =”, “问题”=> {“text”=>“Prova prova prova”,“detail”=>“”},“suggested-query-input”=>“”,“topics”=> [“argomento”,“nuovo”],“variables “=>”prova-prova-prova-1“,”commit“=>”Salva“,”a“=>”questions“} – Massimo 2012-01-12 10:59:05
基本上我想这可能是一个csrf,我不保留...任何理念? – Massimo 2012-01-16 09:19:37
现在的问题是我必须修改我的iOS应用程序或rails应用程序中的somethig吗? – Massimo 2012-01-16 11:35:46