我在我的 iOS 项目中遇到了 ASIHTTPRequest 的问题。我开始一个请求,但有时它响应两次或更多次。
当我开始请求时:
[request addRequestHeader:@"User-Agent" value:@"ASIHTTPRequest"];
[request addRequestHeader:@"Content-Type" value:@"application/json; charset=utf-8"];
[request setRequestMethod:@"GET"];
request.timeOutSeconds = 60;
[request setShouldAttemptPersistentConnection:NO];
[request setDelegate:self];
[request setDidFinishSelector:@selector(getListProduct_OnSuccess:)];
[request setDidFailSelector:@selector(getListProduct_OnError:)];
[request startAsynchronous];
但它有时会遇到一次 getListProduct_OnSuccess ,但有时会遇到两次或更多。你能帮助我吗?谢谢大家!