RACSignal+RQHTTPServiceAdditions.m 511 B

1234567891011121314151617181920
  1. //
  2. // RACSignal+RQHTTPServiceAdditions.m
  3. // RQCommon
  4. //
  5. // Created by 张嵘 on 2018/11/16.
  6. // Copyright © 2018 张嵘. All rights reserved.
  7. //
  8. #import "RACSignal+RQHTTPServiceAdditions.h"
  9. #import "RQHTTPResponse.h"
  10. @implementation RACSignal (RQHTTPServiceAdditions)
  11. - (RACSignal *)rq_parsedResults {
  12. return [self map:^(RQHTTPResponse *response) {
  13. NSAssert([response isKindOfClass:RQHTTPResponse.class], @"Expected %@ to be an RQHTTPResponse.", response);
  14. return response.parsedResult;
  15. }];
  16. }
  17. @end