swiftナニソレなのでコードはObjective-Cです。 ほぼ公式のAFHTTPRequestOperationによるサンプルのまんま。 GETのPromise版オーバーロードを作る。 @interface AFHTTPSessionManager (PromiseKit) - (PMKPromise *) GET: (NSString *) URLString parameters: (NSDictionary *) parameters { return [PMKPromise new:^(PMKPromiseFulfiller fulfiller, PMKPromiseRejecter rejecter) { NSURLSessionTask *task = [self GET: URLString parameters: parameters success:^(NSURLSe