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

[RD-67] Add completion handler to URLProtocol class method: Will perform redirection … #69

Conversation

MinaShehata
Copy link
Contributor

@MinaShehata MinaShehata commented Jan 22, 2023

Task Description
Executing http requests that perform redirection (POST OR GET) requests
and Response Detective is enabled we get this error in output console

ScreenShot
Screenshot 2023-01-22 at 14 11 44

Original Issue

if we disabled Response Detective we didn't get that error because we use native URLProtocol class existed in URLSessionTaskDelegate that has task:willPerformHTTPRedirection:newRequest:completionHandler: completion called completion handler at the end.

Solution
Adding completion handler to task:willPerformHTTPRedirection:newRequest:completionHandler: completion
in NSURLSession delegate RDTURLProtocol this solve the issue

@MinaShehata MinaShehata changed the title add completion handler to URLProtocol class Will perform redirection … [RD-67] Add completion handler to URLProtocol class Will perform redirection … Jan 22, 2023
@MinaShehata MinaShehata changed the title [RD-67] Add completion handler to URLProtocol class Will perform redirection … [RD-67] Add completion handler to URLProtocol class method: Will perform redirection … Jan 23, 2023
@DamianMarkowski DamianMarkowski merged commit 55ec742 into netguru:develop Jan 24, 2023
elgiguiere pushed a commit to elgiguiere/ResponseDetective that referenced this pull request Oct 24, 2023
…-canceled-when-RD-is-enabled

[RD-67] Add completion handler to URLProtocol class method: Will perform redirection …
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

Successfully merging this pull request may close these issues.

3 participants