Skip to content
New issue

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

连续两次请求 #150

Open
WlandRoy opened this issue Jul 28, 2020 · 1 comment
Open

连续两次请求 #150

WlandRoy opened this issue Jul 28, 2020 · 1 comment

Comments

@WlandRoy
Copy link

你好,我这边遇到一个问题,一个get请求h5那边确实只发一次,但是iOS这边却请求两次,在这个canInitWithRequest方法会打印两次,但是h5那边确实只发送一次这个请求,我一句找了好几天了,但是不知道在哪触发第二次请求,所以想请教你

@daydayfree
Copy link
Contributor

有没有对请求做标记,类似

+ (void)markRequestAsIgnored:(NSMutableURLRequest *)request
{
  NSString *key = NSStringFromClass([self class]);
  [NSURLProtocol setProperty:@YES forKey:key inRequest:request];
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants