Skip to content

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

@ghoover

Description

@ghoover

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions