开发者

NSURLConnection duplicate Request

开发者 https://www.devze.com 2023-04-12 13:11 出处:网络
I am using NSURLConnection to send request to server and receive response like this : cmdConn = [[[NSURLConnection alloc] initWithRequest:req

I am using NSURLConnection to send request to server and receive response like this :

cmdConn = [[[NSURLConnection alloc] initWithRequest:req 
                                    delegate:self 
                                    startImmediately:YES] autorele开发者_运维技巧ase];

and receive the response and data in its delegates. connection didReceiveData:(NSData *)data and connection didReceiveData:(NSURLResponse *)response

everything works good but the problem is when I check the server side most of times (not all the times) I receive duplicate request. I checked everything in my code and also server side , it seems the problem is with NSURLConnection .

please help me in this problem , if you have any idea ...


the problem can be about the responses that you get and how you read them . you can also use CFHTTPMessage that is a core foundation class .

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号