I am using ASIHTTP library to send the requests.I send the login in synchronously and then all other requests Asynchronously. My Login seems to work as does the GET method. 开发者_StackOverflow中文版BUT, my Post method does not work. it returns a Error Domain=ASIHTTPRequestErrorDomain Code=3 "Authentication needed". I created the rails server using scaffolding and then added in Devise framework. I have absolutely no clue why the GET method works fine but my post method doesnt.
If i do this in a browser however, it works fine. Can someone please help me out? I can give you all the code you need.
request = [ASIHTTPRequest requestWithURL:url];
[request setUseKeychainPersistence:YES];
[request setUsername:kHTTP_BASIC_AUTHORISE_USERNAME];
[request setPassword:kHTTP_BASIC_AUTHORISE_PASSWORD];
精彩评论