{"action":"created","issue":{"url":"https://api.github.com/repos/csotiriou/AFNetworking-PromiseKit/issues/6","labels_url":"https://api.github.com/repos/csotiriou/AFNetworking-PromiseKit/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/csotiriou/AFNetworking-PromiseKit/issues/6/comments","events_url":"https://api.github.com/repos/csotiriou/AFNetworking-PromiseKit/issues/6/events","html_url":"https://github.com/csotiriou/AFNetworking-PromiseKit/issues/6","id":60833005,"number":6,"title":"Accessing task object of PMKManifold using when with an array of promises","user":{"login":"mluisbrown","id":4175766,"avatar_url":"https://avatars.githubusercontent.com/u/4175766?v=3","gravatar_id":"","url":"https://api.github.com/users/mluisbrown","html_url":"https://github.com/mluisbrown","followers_url":"https://api.github.com/users/mluisbrown/followers","following_url":"https://api.github.com/users/mluisbrown/following{/other_user}","gists_url":"https://api.github.com/users/mluisbrown/gists{/gist_id}","starred_url":"https://api.github.com/users/mluisbrown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mluisbrown/subscriptions","organizations_url":"https://api.github.com/users/mluisbrown/orgs","repos_url":"https://api.github.com/users/mluisbrown/repos","events_url":"https://api.github.com/users/mluisbrown/events{/privacy}","received_events_url":"https://api.github.com/users/mluisbrown/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-12T15:04:03Z","updated_at":"2015-03-19T23:14:47Z","closed_at":null,"body":"Hi,\r\nGreat library. Just one question:\r\n\r\nI'm using `AFHTTPSessionManager` and using `when` to make an array of POST requests and wait for their completion:\r\n\r\n```objective-c\r\n    NSMutableArray *requests = [NSMutableArray array];\r\n\r\n    for (Foo *foo in someFoos) {\r\n        [requests addObject:[self POST:@\"http://www.foo.com/api\"\r\n                            parameters:params]];\r\n    }\r\n\r\n    [PMKPromise when:requests].then(^(NSArray *results) {\r\n    \tfor (id responseObject in results) {\r\n\t    \t// do stuff with the responseObject    \t\r\n    \t}\r\n    \t\r\n    \t// how do I get to the NSURLSessionDataTask (task) object\r\n    \t// which is also in the Promise: fulfiller(PMKManifold(responseObject, task));\r\n    \t\r\n    }).catch(^(NSError *error) {\r\n        NSLog(@\"Error: %@\", error);\r\n    });\r\n```\r\n\r\nThe `NSArray` that I get in the `then` is an array of `responseObjects`, the first object in the PMKManifold that you create as the fulfiller. How do I access the task object which is also in the PMKManifold?\r\n"},"comment":{"url":"https://api.github.com/repos/csotiriou/AFNetworking-PromiseKit/issues/comments/83798445","html_url":"https://github.com/csotiriou/AFNetworking-PromiseKit/issues/6#issuecomment-83798445","issue_url":"https://api.github.com/repos/csotiriou/AFNetworking-PromiseKit/issues/6","id":83798445,"user":{"login":"csotiriou","id":1228484,"avatar_url":"https://avatars.githubusercontent.com/u/1228484?v=3","gravatar_id":"","url":"https://api.github.com/users/csotiriou","html_url":"https://github.com/csotiriou","followers_url":"https://api.github.com/users/csotiriou/followers","following_url":"https://api.github.com/users/csotiriou/following{/other_user}","gists_url":"https://api.github.com/users/csotiriou/gists{/gist_id}","starred_url":"https://api.github.com/users/csotiriou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csotiriou/subscriptions","organizations_url":"https://api.github.com/users/csotiriou/orgs","repos_url":"https://api.github.com/users/csotiriou/repos","events_url":"https://api.github.com/users/csotiriou/events{/privacy}","received_events_url":"https://api.github.com/users/csotiriou/received_events","type":"User","site_admin":false},"created_at":"2015-03-19T23:14:47Z","updated_at":"2015-03-19T23:14:47Z","body":"I just made a commit that will allow you to do the following. \r\n\r\n\tself.manager = [[AFHTTPSessionManager alloc] initWithBaseURL:    \r\n\t[[NSURL alloc] initWithString:@\"http://oramind.com\"]];\r\n\tself.manager.responseSerializer = [AFHTTPResponseSerializer serializer];\r\n\r\n    [self.manager GETMultiple:@[@\"/\", @\"/\", @\"/\", @\"/\"] parameters:@[@{},@{},@{},@{}]].then(^(NSArray * responsesArray){\r\n        for (NSDictionary *responseDictionary in responsesArray){\r\n            NSLog(@\"task description: %@\", responseDictionary[kPMKAFResponseTaskKey]);\r\n            NSLog(@\"response object description: %@\", responseDictionary[kPMKAFResponseObjectKey]);\r\n        }\r\n    });\r\n\r\nIf you want, you can checkout the master repo and test it. I won't update the Cocoapods repo yet. Does that seem to solve your issue?\r\n\r\nIt was the only non-invasive solution I could think of for the time being. "}}