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