SPURLConnection Class Reference
| Inherits from | NSObject |
| Conforms to | NSURLConnectionDelegate |
| Declared in | SPURLConnection.h |
Overview
A wrapper over NSURLConnection that simplifies its usage by routing the result into a simple block.
Tasks
Initialization
-
– initWithRequest:Initializes a connection for a certain request. The request is NOT started automatically.
Methods
-
– startWithBlock:Starts the request asynchronously. The callback block will be executed from the calling thread.
-
– cancelCancels an asynchronous load of a request.
Instance Methods
cancel
Cancels an asynchronous load of a request.
- (void)cancelDiscussion
Cancels an asynchronous load of a request.
Declared In
SPURLConnection.hinitWithRequest:
Initializes a connection for a certain request. The request is NOT started automatically.
- (instancetype)initWithRequest:(NSURLRequest *)requestDiscussion
Initializes a connection for a certain request. The request is NOT started automatically.
Declared In
SPURLConnection.hstartWithBlock:
Starts the request asynchronously. The callback block will be executed from the calling thread.
- (void)startWithBlock:(SPURLConnectionCompleteBlock)completeBlockDiscussion
Starts the request asynchronously. The callback block will be executed from the calling thread.
Declared In
SPURLConnection.h