NSURLConnection+RACSupport.h 730 B

1234567891011121314151617181920212223242526
  1. //
  2. // NSURLConnection+RACSupport.h
  3. // ReactiveCocoa
  4. //
  5. // Created by Justin Spahr-Summers on 2013-10-01.
  6. // Copyright (c) 2013 GitHub, Inc. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. @class RACSignal;
  10. @interface NSURLConnection (RACSupport)
  11. // Lazily loads data for the given request in the background.
  12. //
  13. // request - The URL request to load. This must not be nil.
  14. //
  15. // Returns a signal which will begin loading the request upon each subscription,
  16. // then send a `RACTuple` of the received `NSURLResponse` and downloaded
  17. // `NSData`, and complete on a background thread. If any errors occur, the
  18. // returned signal will error out.
  19. + (RACSignal *)rac_sendAsynchronousRequest:(NSURLRequest *)request;
  20. @end