We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V2DataManager中,我想某一个网络请求进行之前,先取消之前的这个请求。类似第二次点击查询按钮,第二次点击的时候,把第一次的同样请求先取消掉~请问该如何做? 谢谢。
The text was updated successfully, but these errors were encountered:
得维持一个队列吧,比如对 /user/login 有正在进行的操作,再来一个 /user/login 的请求就丢掉一个。
Sorry, something went wrong.
V2DataManager 里的接口都是返回 NSURLSessionDataTask, 只要在 VC 里持有它就可以 cancel, 同一个界面再次调用同样接口时 cancel 之前的再发起新的请求就可以。另外,也可以如 @SeanChense 所说,维持一个队列, AFHTTPSessionManager 里就有,可以加入判断来在这一层处理重复请求。
No branches or pull requests
V2DataManager中,我想某一个网络请求进行之前,先取消之前的这个请求。类似第二次点击查询按钮,第二次点击的时候,把第一次的同样请求先取消掉~请问该如何做?
谢谢。
The text was updated successfully, but these errors were encountered: