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

addRequestForProtocol won't be called. with Alamofire #12

Open
wanbok opened this issue Jan 7, 2016 · 2 comments
Open

addRequestForProtocol won't be called. with Alamofire #12

wanbok opened this issue Jan 7, 2016 · 2 comments

Comments

@wanbok
Copy link

wanbok commented Jan 7, 2016

Hi,

I'm using Alamofire on my project and trying to use AMYServer.
But it's not worked.

Because - (id)initWithRequest:(NSURLRequest *)request cachedResponse:(NSCachedURLResponse *)cachedResponse client:(id<NSURLProtocolClient>)client isn't called.

Therefore _AMYURLProtocol's pendingRequests has nothing.

@wanbok wanbok changed the title addRequestForProtocol won't be called. with Alamofire addRequestForProtocol won't be called. with Alamofire Jan 7, 2016
@bnickel
Copy link
Contributor

bnickel commented Jan 7, 2016

I'd wager that the current setup doesn't work properly with NSURLSession. I believe we need to incorporate this fix where we do registerClass: http://stackoverflow.com/a/28720198/860000

@wanbok
Copy link
Author

wanbok commented Jan 12, 2016

@bnickel registerClass is already run by AMYServer's start method.
I found some article from OHHTTPStubs's issue

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