NSURLConnection duplicate Request
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 .
精彩评论