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

Can't defer response from handleMethod:withPath:block: #14

Open
ghoover opened this issue Dec 20, 2014 · 0 comments
Open

Can't defer response from handleMethod:withPath:block: #14

ghoover opened this issue Dec 20, 2014 · 0 comments

Comments

@ghoover
Copy link

ghoover commented Dec 20, 2014

I'd like handleMethod:withPath:block: to be able to defer response until after some other asynchronous action has completed.

For example:
handleMethod is called, I pull data from Core Data asynchronously, and finally respond to the HTTP request with respondWithString: (or other).

The problem is that the connection is immediately closed after the end of the block call in handleMethod:withPath:block:. I kind of just assumed it would be possible to do what I was thinking based on the method names and the use of blocks. Is it possible to add an asynchronous group of responses that hold the connection open until I mark done?

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

1 participant