iOS Development: Why do I always get the “A connection failure occurred” on the 1st attempt, but success on the next?

前端 未结 4 828
星月不相逢
星月不相逢 2020-12-24 14:17

I\'m using the ASIHTTPRequest lib in my iOS app to make RESTful requests to my Rails 3 web app. I seeing a weird and somewhat consistent error the 1st time I try to make a

4条回答
  •  感动是毒
    2020-12-24 15:10

    On iOS 5.1, even after upgrading ASIHTTPRequest to ASIHTTPRequestVersion = @"v1.8.1-61 2011-09-19" still needed:

    ASIHTTPRequest *req = [ASIHTTPRequest requestWithURL:url];
    req.shouldAttemptPersistentConnection = NO;
    

提交回复
热议问题